21 lines
490 B
C#
21 lines
490 B
C#
namespace Thousandto.Update.Singleton
|
|
{
|
|
/// <summary>
|
|
/// UILoginFormScript的逻辑处理类
|
|
/// </summary>
|
|
public abstract class Singleton<T> where T : Singleton<T>, new()
|
|
{
|
|
private static T _instance;
|
|
public static T Instance
|
|
{
|
|
get
|
|
{
|
|
if (_instance == null)
|
|
{
|
|
_instance = new T();
|
|
}
|
|
return _instance;
|
|
}
|
|
}
|
|
}
|
|
} |