What is a static class?
We can declare a static class. We use static class when there is no data or behavior in the class that depends on object identity. A static class can have only static members. We can not create instances of a static class using the new keyword. .NET Framework common language runtime (CLR) loads Static classes automatically when the program or namespace containing the class is loaded.
Here are some more features of static class
- Static classes only contain static members.
- Static classes can not be instantiated. They cannot contain Instance Constructors
- Static classes are sealed.
what is the difference between static and private constructor?
ReplyDeleteclieck this link to know more about static class
ReplyDeletehttp://www.dotnetpal.com/framework/staticvariable.html
Thanks for this wonderful post. The information in this article is very helpful to me. Thanks a lot for sharing. Keep blogging.
ReplyDeleteBest Truth or Dare Questions for Kids