Private Keyword


Private Keyword

Description

The Private keyword is used to set the access level for various types and type members. By including this keyword, the associated type or member can only be accessed within its declaration context. For instance, members within a class that use the Private keyword can only be accessed within that class's code.

The Private 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, fields and constants declared within classes have Private access.

See Also

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

Friend Keyword, Protected Keyword, Public 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