The "Of" keyword?

J

johnb41

Is the "Of" keyword new to VB.NET 2.0?

For example, I am trying to make sense of the sample screensaver
application that's packaged with Express 2005 Edition.

In many of it's classes, it has code like so:

Public Class XYZ (Of T as IItem)
...
End Class

I've never actually seen "Of" in any code sample before.

1) Is this new to the updated VB.NET language?
2) What does it mean/do?

I can't google it because it strips the word "of" in all searches.

Thanks!
John
 
G

Guest

I love those 2 letters! The uses of "Of" is one of the big reasons I want
to get off of VS 2003 and onto 2005.
 
J

Jay B. Harlow [MVP - Outlook]

John,
As Herfried suggests, yes its new in .NET 2.0.

It is the "gateway" to Generics, which is a powerful new feature in .NET 2.0
that opens up Parametric Polymorphism. Parametric Polymorphism & other types
of polymorphism are explained here:

http://www.javaworld.com/javaworld/jw-04-2001/jw-0413-polymorph.html
http://en.wikipedia.org/wiki/Polymorphism_(computer_science)


Here are some addition links on Generics:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnhcvs04/html/vs04k1.asp

http://www.tsbradley.net/Presentations/Generics.aspx

http://msdn2.microsoft.com/en-us/library/w256ka79.aspx

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


| Is the "Of" keyword new to VB.NET 2.0?
|
| For example, I am trying to make sense of the sample screensaver
| application that's packaged with Express 2005 Edition.
|
| In many of it's classes, it has code like so:
|
| Public Class XYZ (Of T as IItem)
| ...
| End Class
|
| I've never actually seen "Of" in any code sample before.
|
| 1) Is this new to the updated VB.NET language?
| 2) What does it mean/do?
|
| I can't google it because it strips the word "of" in all searches.
|
| Thanks!
| John
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top