What is a Static class in C#?

 Posted by vishalneeraj-24503 on 1/14/2014 | Category: C# Interview questions | Views: 774 | Points: 40
Answer:

Static class is a class which can be used or accessed without creating an instance of the class.

Static class has following features:-
1. Static class only contains static members and a private constructor.
2. Static class cannot be instantiated i.e. we can create object of Static Class because they are Private.
3. Static classes are sealed by default and therefore cannot be inherited.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response