What do we mean by Static Class?

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

An static class has static keyword.A static classes are the classes whose object can not be created and we can not use New keyword to instantiate object.
It has private access modifiers.All the methods, properties, and variables are declared inside Static Classes are static meaning that we have to give static keyword in all methods,fields.

Syntax:

Public Static class projects

{
public static int project_id;

public static Get_Project_Details(int project_id)
{
}
}


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response