private static ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name); public static UserInfo Instance { get { return Linstance.Value; } } private static readonly Lazy<UserInfo> Linstance = new Lazy<UserInfo>(() => return new UserInfo(););
访问时直接访问 Instance 即可。
来自: https://www.cnblogs.com/1zhk/p/5257340.html