Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to return variable type at runtime?????????
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00890850
Message ID:
00890925
Vues:
23
Dan,

It is returning an VariantType enumeration. To get the string equivalent, just use the ToString after the call like the following:
VarType(oObj).ToString
>Thank you for your response. The vartype was returning a number and I could not tell what the result was. I found out that variable.GetType.ToString() does the trick. BTW How can I find what the return of vartype is telling me?
>
>Thank you
>
>
>
>
>>Hi Dan,
>>
>>You can use VarType like below:
>>
>>
>>VarType(oObj)
>>
>>
>>>Hello all,
>>>
>>>I would like to know how to return a variable type at runtime in vb .net. I am used to programming in Foxpro and I would do something like:
>>>TYPE(cExpression) which would return the datatype of its contents. If it is an object would return "O", character "C" and so on. Any help would be appreciated.
>>>
>>>TIA,
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform