Werries-SA
Werries-SA

Reputation: 11

How to get the Full Type Name of an object

I want to get the full name of an object declared. The following method do not give me what I want:

Dim objTemp As System.Int32

Debug.Print(TypeName(objTemp))

The result is Integer, I want to have is as declared System.Int32

Upvotes: 0

Views: 966

Answers (2)

GetType() returns only 1 level when GetType().FullName gives you the entire mapping including the assembly.

Dim objTemp As System.Int32

Debug.Print(objTemp.GetType().FullName)

Upvotes: 2

Mr. Tripodi
Mr. Tripodi

Reputation: 827

Use GetType.ToString

objTemp.GetType.ToString

Upvotes: 0

Related Questions