9.28.2012

VFP vs C# vs VB.NET Access Specifiers

Are you frustrated in searching Working Links through Search Engines ?

Difference between Visual FoxPro(VFP), C# and VB.NET Access Specifiers

VFP
C#
VB.NET
N/A
Internal
Friend
N/A
Protected Internal
Protected Friend
Hidden
Private
Private

Note: VFP,C# and VB.NET have the same name for 'Public' and 'Protected' Access Specifiers.

Meaning of Access Specifiers:
  1. Public - Fully accessible outside the class.
  2. Protected - Accessible only to the class itself and its derived classes.
  3. Internal / Friend: Access is limited to other classes in the current assembly.
  4. Protected Internal / Protected Friend: Access is limited to the current assembly or types derived from the containing class.
  5. Hidden / Private / Private: Accessible only to the class itself, but not from its derived classes.

3 comments: