TypeInfo.Name vs. VarType as UInt32


I have a problem using constructor parameters of introspection.

When the element types of an array of variants needs to be checked against the ParameterInfo, how would I do this.

ArgType = Introspection.GetType(Args(i))

gives me Nil because it’s a value type

Par.ParameterType.Name gives me “string”

VarType(Args(i))  // gives UInt32

Do I have to write a mapping myself between TypeString, TypeDouble, etc. and Name of TypeInfo?

Btw., help says for ConstructorInfo

Invoke(Optional params() As Auto) As Auto

But compiler wants params() as Variant

Any idea really appreciated!

for variant, check type property.

Hi, Christian,
thanks a lot for the tip.

But Type of Variant is also an integer; I have to match the ParameterInfo type somehow to find the correct constructor.
At the moment I use matching ubounds count for parameters and arguments; but overloading may have same amount of parameters/arguments with different types.

The only type information from PropertyInfo I can get is IsPrimitive.

I guess, I have to match it by an own function.