Thursday, 11 September 2014

Default Scope of Class In C# Dot.net?





Hi All,  
Today i am going to explain the default scope of class  in C# .  
default scope of  class is internal, 
Class can  be public either internal , it can never be Private or protected  and protected Internal.  
In order to understand ,create the console Application.



















Go to Object Browser (Ctrl+Alt+j) here we will see the default scope of class.






















   Class can be Public also, but it can never be protected  , Private and  protected internal.
















So let me clarify "Default scope of class is internal" class can be public and internal but it can never be a protected  , private and protected  internal.

Happy coding...  
 

No comments:

Post a Comment