KB-31936: Function returning the object type.

Question:

Which function returns the object type?

Solution:

The function is TypeName().

Example of script:

Dim ArrayVar(4), MyType

NullVar = Null  
MyType = TypeName(“VBScript”)   ‘ Returns “String”.
MyType = TypeName(4)            ‘ Returns “Integer”.
MyType = TypeName(37.50)        ‘ Returns “Double”.
MyType = TypeName(NullVar)      ‘ Returns “Null”.
MyType = TypeName(ArrayVar)     ‘ Returns “Variant()”.

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *