Static class in C#

Static Class
                          we cannot create an object of that class using the new keyword, such that class members can be called directly using their class name.
  • Created using the static keyword.
  • Inside a static class only static members are allowed, in other words everything inside the static class must be static.
  • We cannot create an object of the static class.
  • A Static class cannot be inherited.
  • It allows only a static constructor to be declared.
  • The methods of the static class can be called using the class name without creating the instance.
    (e.g)
Static class Employee
{

}

Comments

Popular posts from this blog

Types of Architects

Basic measurements

Search html table contents based on its td using Jquery