Can we declare a class as Protected?

 Posted by Poster on 5/8/2010 | Category: C# Interview questions | Views: 7243
Answer:

No, a class can not be declared as Protected.

A class can be declared with only following access modifiers.

Abstract
Internal
Public
Sealed
Static
Extern (The extern modifier is used to declare a method that is implemented externally. - http://msdn.microsoft.com/en-us/library/e59b22c5(VS.80).aspx)

Thanks


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response