From Xojo Documentation

Revision as of 18:55, 19 November 2009 by (talk) (Examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!


Contains information about the constructors for a class via the Introspection system.

Super Class



Name Type Description
ReturnType TypeInfo If the constructor returns a value, this is the datatype of the returned value. If the method does not return a value, ReturnType is Nil.


Name Parameters Return Type Description
GetParameters ParameterInfo() Returns an array of ParameterInfo items. Use GetParameters to obtain datatype information on the constructor's parameters.
Changed 2008r2
[params() as Variant] Datatype of the object being instantiated. Invokes the constructor. Pass the optional array of variants for the constructor's parameter values, if any. You will get an OutOfBoundsException if the number of parameters does not match or an IllegalCastException if the types do not match.


This example gets the ConstructorInfo for the FolderItem class. The Invoke method is used to create a new instance based on the constructor that takes no parameters.

Dim ci() as Introspection.ConstructorInfo=ti.GetConstructors


See Also

Introspection module; AttributeInfo, MemberInfo, MethodInfo, ObjectIterator, ParameterInfo, PropertyInfo, TypeInfo classes; GetTypeInfo function.