public class Singletonwhere T : class, new(){ public static T Value { get { return Instance.Value; } } private static class Instance { public static readonly T Value = new T(); }}
本文共 249 字,大约阅读时间需要 1 分钟。
public class Singletonwhere T : class, new(){ public static T Value { get { return Instance.Value; } } private static class Instance { public static readonly T Value = new T(); }}
转载地址:http://cgbzl.baihongyu.com/