Interviews14 answers
What is the default access modifier of a class?
14 Answers
Public
Mukesh KumarPosted Sep 12, 2017, 6:10 AM EDT
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.
Amit MishraPosted Dec 13, 2016, 12:03 AM EST
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.
Amit MishraPosted Dec 13, 2016, 12:03 AM EST
internal
shikhar gihlotraPosted Nov 24, 2016, 9:06 AM EST
internal
Sanjay MauryaPosted Nov 21, 2015, 1:40 AM EST
private
Pramod VermaPosted Feb 7, 2015, 3:10 AM EST
Private
Pramod VermaPosted Feb 7, 2015, 3:09 AM EST
private
Sunil GadedPosted Aug 28, 2014, 2:50 AM EDT
i hope its private as per Msdn
sharath p aPosted Jul 18, 2014, 7:06 AM EDT
Default access modifier for class in C# is private. Check here: http://msdn.microsoft.com/en-us/library/ba0a1yw2.aspx
plmPosted Mar 10, 2014, 11:26 AM EDT
internal
suresh ShewalePosted Feb 10, 2014, 3:40 PM EST
internal
Vijay KumarPosted Jan 15, 2014, 8:21 PM EST
internal
Ashish SinghPosted Dec 21, 2013, 11:41 PM EST
internal
Sandeep Singh ShekhawatPosted Dec 19, 2013, 7:11 PM EST




