bungpeng Posted June 9, 2003 Posted June 9, 2003 How do I check the data type of my object? like String, Integer... Quote
bungpeng Posted June 9, 2003 Author Posted June 9, 2003 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? Quote
*Experts* mutant Posted June 9, 2003 *Experts* Posted June 9, 2003 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 Quote
bungpeng Posted June 9, 2003 Author Posted June 9, 2003 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? Quote
*Gurus* divil Posted June 9, 2003 *Gurus* Posted June 9, 2003 Yes Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.