我看到了这样的实现:
class MyClass
{
private static readonly MyClass _instance = new MyClass();
public static MyClass Instance{
get{ return _instance; }
}
}
为什么不让它变得简单呢?
class MyClass
{
public static readonly MyClass Instance = new MyClass();
}