20 lines
389 B
C#
20 lines
389 B
C#
namespace Roy
|
|
{
|
|
/// <summary>
|
|
/// 管理类基类
|
|
/// </summary>
|
|
/// <typeparam name="T"></typeparam>
|
|
public class BaseManager<T> where T : new()
|
|
{
|
|
private static T _instance;
|
|
|
|
public static T GetInstance
|
|
{
|
|
get
|
|
{
|
|
_instance ??= new T();
|
|
return _instance;
|
|
}
|
|
}
|
|
}
|
|
} |