C
Cerebrus99
Hi all,
"If the Dim statement is used (in Visual Basic .NET) or no access modifier
is used (in Visual C#), the variable is considered private in Visual C# and
Visual Basic .NET classes, Public in Visual Basic .NET structures, and
private in Visual C# structures. Methods do not require an access modifier.
If no access modifier is specified, the method is Private by default if in a
class or structure in C#, and Public if in a class or structure in Visual
Basic .NET."
--- MCAD/MCSD Training Kit Windows Apps. Exam 70-306.
Joe wrote :
Hi Joe,
I think you are not entirely right. There is no such thing as "public within
the module". The definition of a private variable is one that is not visible
*outside* of the type to which it belongs (Class or struct). "Private" is
the most you can limit the access level, and even all Private variables can
be freely accessed within the class they are declared.
by default Public.
"If the Dim statement is used (in Visual Basic .NET) or no access modifier
is used (in Visual C#), the variable is considered private in Visual C# and
Visual Basic .NET classes, Public in Visual Basic .NET structures, and
private in Visual C# structures. Methods do not require an access modifier.
If no access modifier is specified, the method is Private by default if in a
class or structure in C#, and Public if in a class or structure in Visual
Basic .NET."
--- MCAD/MCSD Training Kit Windows Apps. Exam 70-306.
Joe wrote :
The variable is private to the module BUT public within the module.
Hi Joe,
I think you are not entirely right. There is no such thing as "public within
the module". The definition of a private variable is one that is not visible
*outside* of the type to which it belongs (Class or struct). "Private" is
the most you can limit the access level, and even all Private variables can
be freely accessed within the class they are declared.
Yes, you are right about that. As above, variables in VB.NET structures areI believe it depends more on where the variable is declared.
by default Public.