Characteristics of static class:
1 There cannot be an instance constructor, only a static constructor, and access modifiers cannot be used on its constructor.
2 Static classes are sealed and cannot be inherited
3 Static classes can only contain static members
Static classes can be used when there is no data or behavior in the class that relies on the object's identity. Static classes generally serve as an organizational unit for methods that are not associated with a specific object.
Recently, while reading the code in Chapter 3 of the full analysis of asp.net website development, I encountered a class called public static class Helpers under APP_CODE. I don’t quite understand it. First, I searched the static class keyword in Google Baidu and found no relevant content. Then use the keyword: static class site:msdn.microsoft.com and the problem is solved. I write this article in the hope that if someone makes the same mistake as me in the future, they can find relevant knowledge when searching for the staic class keyword.
Keyword: static class site:msdn.microsoft.com
Related links: http://msdn.microsoft.com/zh-cn/library/79b3xss3(VS.80).aspx
http://msdn.microsoft.com/zh-cn/library/79b3xss3.aspx
-