Wednesday, May 2, 2007

Type of Scope Modifiers in C#

  • internal - defines a type, method or data member as public scope in the context of an assembly. The type, method, or data member cannot be accessed from outside the assembly.
  • internal protected - just like the internal scope method however the method or data member has public scope in the subclassed type.
  • private - defines a data member or method that is not accessible outside of the type defining the method or data member.
  • protected - methods and data members are scoped as private however if the method or data member is callable from a subclassed type.
  • public - defines method and data members accessible regardless of the assembly or program scope.

No comments: