Get data type of object?

OK, I just get it in MSDN Help, use:

If TypeOf myObject Is String then
......
End If

Now another question is, can I use "Select Case" for TypeOf? How to do? because there are too many possibilities of data type, right?
 
You would have to use if...elseif for that. You can however use SelectCase to return a boollean about the object:
Code:
Select Case TypeOf r Is String
         Case true
                 is a string
         Case false 
                 is not a string
End Select
 
This is not what I want, it will make a lot of coding in my program....

you mean I can only use "if ... elseif...." for all the possible data type?
 
Back
Top