Can we create a class private?

 Posted by Rajni.Shekhar on 6/27/2012 | Category: C# Interview questions | Views: 2187 | Points: 40
Answer:

No, we can not create a class private, it will give runtime error.

Example:
private class <classname>

{
}

compile time error. class can not be defined as private, protected and internal.


Asked In: HCL | Alert Moderator 

Comments or Responses

Login to post response