Name
Private Statement
Synopsis
Private [WithEvents]varname
[([subscripts
])] [As [New]type
] _ [, [WithEvents]varname
[([subscripts
])] [As [New]type
]] ...
WithEvents
optional; KeywordA keyword that denotes the object variable,
varname
, can respond to events triggered from within the object to which it refersvarname
required; anyThe name of the variable, following Visual Basic naming conventions
subscripts
optional; Integer or LongDenotes
varname
as an array and specifies the number and extent of array dimensionsNew
optional; KeywordUsed to automatically create an instance of the object referred to by the
varname
object variabletype
optional; KeywordData type of the variable
varname
Description
Used at module level to declare a private variable and allocate the
relevant storage space in memory. Private
can also
be used with procedures and class modules.
Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.