Public Keyword


Public Keyword

Description

The Public keyword is used to set the access level for various types and type members. By including this keyword, the associated type or member can be used by virtually any code within the current assembly, or within other assemblies if the code has been configured for external access.

The Public keyword can be used with the following statements:

Class Statement
Const Statement (but not for local constants)
Declare Statement
Delegate Statement
Dim Statement (but not for local variables)
Enum Statement
Event Statement
Function Statement
Interface Statement
Property Statement
Structure Statement
Sub Statement

By default, methods and properties declared within classes have Public access, as do all structure members.

See Also

For the statements listed above, see the related entries elsewhere in this chapter for usage information. For information on using the Public keyword as a statement, see the entry for the Dim Statement.

Friend Keyword, Private Keyword, Protected Keyword




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net