14
Reply

What is the default access modifier of a class?

Pravin Shukla

Pravin Shukla

12y
2.7k
0
Reply
    Please read this MSDN carefully. It says:- Top-level types, which are not nested in other types, can only have internal or public accessibility. The default accessibility for these types is internal. Nested types, which are members of other types, can have declared accessibilities as indicated in the following table.So, parent class is Internal by default.
    Default access modifier for class in C# is private. Check here: http://msdn.microsoft.com/en-us/library/ba0a1yw2.aspx
    internal
    Public
    Please read this MSDN carefully. It says:- Top-level types, which are not nested in other types, can only have internal or public accessibility. The default accessibility for these types is internal. Nested types, which are members of other types, can have declared accessibilities as indicated in the following table.So, parent class is Internal by default.
    internal
    internal
    private
    Private
    private
    i hope its private as per Msdn
    internal
    internal
    internal