内容目录
- The static class constructor cannot have access modifiers, cannot be called externally, and has no parameters;
- The static class constructor is triggered before creating the first instance or calling the first member;
- A static class cannot be inherited;
On the other hand, the singleton pattern is an ordinary type that can be instantiated and can have multiple constructors; it can also be inherited;
文章评论