Accessibility modifiers
Internal
The variable can only accessed by the current program.
Public
The variable can be accessed from any where as a field.
Protected
The variable can only be accessed with the class in which it’s defined and it’s derived class.
Protected internal
The variable can only be accessed from the current program and the type derived from the current program.
private
The variable can only be accessed within the type in which it’s defined.
No comments:
Post a Comment