Hi Friends......
I want to know, how many create instance of static class ? Please explain ?
Thanks......
Instance of static class
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Feb 6, 2012, 5:58 AM EST
It is just designed to be a container for a bunch of related static members. System.Math in the .NET Framework is a good example of one:
http://msdn.microsoft.com/en-us/library/system.math.aspx
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 6, 2012, 5:48 PM EST
A class can be declared static, indicating that it contains only static members. It is not possible to create instances of a static class using the new keyword. Static classes are loaded automatically by the .NET Framework common language runtime (CLR) when the program or namespace containing the class is loaded.
Static classes are sealed and therefore cannot be inherited. Static classes cannot contain a constructor, although it is still possible to declare a static constructor to assign initial values or set up some static state.
Vinnet, Is there any special requirement to doing this??
hope this help.