Of Keyword


Of Keyword

Syntax

     (Of typeParamList) 


typeParamList (required; any)

Adds type parameter placeholders that will later enforce strong typing when the related construct is used.

Description

The Of keyword enables generics, the use of type parameters in a language construct, such as a class definition. Type parameters are used as placeholders for strongly typed data, to be enforced when the related construct is instantiated.

Generics are fully described in Chapter 10, complete with examples.

Usage at a Glance

Type parameters added with the Of keyword cannot be used with Common Language Specification (CLS) compliant components.

Version Differences

Generics and the Of keyword are new with Visual Basic 2005.

See Also

Class...End Class Statement, Delegate Statement, Function Statement, Interface...End Interface Statement, Structure Statement, Sub Statement




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