Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

 

If TypeOf myObject Is String then

......

End If

[/Quote]

 

Now another question is, can I use "Select Case" for TypeOf? How to do? because there are too many possibilities of data type, right?

  • *Experts*
Posted

You would have to use if...elseif for that. You can however use SelectCase to return a boollean about the object:

Select Case TypeOf r Is String
        Case true
                'is a string
        Case false 
                'is not a string
End Select

Posted

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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...