@Paradox 技术支持

1
2
3
4
5
6
7
8
9
10
11
12
13
public abstract class Base<T> where T : new()
{
    private static T _instance;
    public static T Instance
    {
        get
        {
            if (_instance == null)
                _instance = new T();
            return _instance;
        }
    }
}
1
2
3
public sealed class A : Base<A>
{
}

更多内容:http://www.liubaicai.net/index.php/archives/366

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-09
  • 2021-09-13
  • 2021-05-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-27
  • 2021-07-30
  • 2022-12-23
  • 2021-09-04
  • 2021-06-02
  • 2021-09-16
相关资源
相似解决方案