Michael,
As the others suggest the GetType keyword is equivalent to C#'s typeof
keyword.
Not to be confused with the Type.GetType method/function.
The GetType keyword expects an identifier, while Type.GetType expects a
String.
Dim t1 As Type = GetType(Integer)
Dim t2 As Type = Type.GetType("System.Int32")
For known types I find the GetType keyword is better as you receive compile
errors if you miss type the identifier. I reserve Type.GetType for types
that are only known at runtime, such as ones read from my app.config or XML
schema files.
Hope this helps
Jay
| What's the VB equivalent of the C# typeof() operator (it doesn't appear to
| be the VB "TypeOf" operator). Thanks.
|
|