10.25.05

Scope of Class Members; Public, Private, Protected, Friend

Posted in Uncategorized at 2:10 am by aspnet

Scope of a Class Members

Besides Private and Public, VB.NET introduces few new keywords. The following keywords are used to define scope of a class member. 
Keyword 
Scope 

Private 
Scope is limited to the defined class only. 

Public 
Object can be called from the outside of the class. 

Friend 
Scope is limited to the application in which class is defined. 

Protected 
Available to the class and it’s derived classes. 

Protected Friend 
Available to the class, the application, and the derived classes. 

Leave a Comment