C# and VB.NET: Tricky Things on Access Modifiers
Access modifiers allows you to control how the elements of your application are accessed. Access modifiers are keywords such as Public, Private, Protected, Friend, and Protected Friend in VB.NET (public, private, protected, internal, protected internal in C#).
For member variables with no access modifiers used:
- Private in VB.NET and C# classess.
- Public in VB.NET structures.
- Private in C# structures.
Although methods does not require an access modifiers, you should be aware of its scope if it's not specified:
- Private by default in a class or structure in C#.
- Public in a class or structure in VB.NET.