Default type access modifier

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
 
J

Jon Skeet

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top