IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesVB.Net  Print This     

Member Visibility (VB.Net and Access VBA Cross Reference Guide)

By Mike Prestwood

VB.Net versus Access VBA: A side by side comparison between VB.Net and Access VBA.

 
OOP Basics
 

Some languages support object-based concepts such as Paradox, Access, and VB Classic. Other languages have OO extensions and fully support object orientation in a hybrid fashion (such as C++ and Dephi for Win32). Finally, some lanages such as C#, VB.Net, Prism, and Java are entirely written in OO. Meaning, every line of code written must occur within a class).

Member Visibility

[Other Languages] 

General Info: Class Visibility Specifiers

In OOP languages, members of a class have a specific scope that indicates visibility. Standard visibility includes private, protected, and public. Private members are usable by the defining class only (fully encapsulated). They are invisible outside of the class except by friendly classes. Protected members are usable by the defining class and descendant classes only (plus friendly classes). Public members are usable wherever its class can be referenced.

Languages Focus

Traditional member visibility specifiers for fully OOP languages are private, protected, and public. Many modern OOP languages implement additional member visibilities.

Additional member modifiers are documented under the Member Modifiers topic.

VB.Net:  "Access Modifiers"

In VB.Net, you specify each class and each class member's visibility with an access modifier preceding class or member. The VB.Net access modifiers are the traditional Public, Protected, and Private plus the two additional .Net modifiers Friend and Protected Friend.

Friend indicates members are accessible from types in the same assembly. Protected Friend indicates members are accessible from types in the same assembly as well as descendant classes. OO purist might object to Friend and Protected Friend and I suggest you avoid them until you both fully understand them and have a need that is best suited by them.

Syntax Example:
Public Class Cyborg
Inherits Object
 
  Private FName As String
End Class
[Not specified yet. Coming...]












Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]