Default type access modifier

  • Thread starter Thread starter Jacob N. Rohde
  • Start date Start date
J

Jacob N. Rohde

Hi guys,

I was under the assumption that the default type access modifier for
classes/structs is internal. But the MCAD Study Guide (from MS even) says
public?!?! (The Dr. GUI .NET tutorial from MS's site says internal!!)

So which source from MS do I believe? It is internal is it not?

Thanks
 
Jacob N. Rohde said:
I was under the assumption that the default type access modifier for
classes/structs is internal. But the MCAD Study Guide (from MS even) says
public?!?! (The Dr. GUI .NET tutorial from MS's site says internal!!)

So which source from MS do I believe? It is internal is it not?

It's internal, or private for nested classes, according to the spec. To
test out the practice, just compile a small class and look at the
resulting assembly with ildasm or Lutz Roeder's Reflector.
 
Back
Top