通用单例模式
摘要:
public class Singleton where T : class, new(){ public static T Value { get { return Instance.Value; } } private static class Instance { public static readonly T Value = new T(); }} 阅读全文
posted @ 2013-11-14 13:06 JRoger 阅读(147) 评论(0) 推荐(0) 编辑