Difference between revisions of "ConstructorInfo"
From Xojo Documentation
(→Examples) |
|||
(20 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{ClassBox | ||
+ | | super=[[MemberInfo]] | ||
+ | | platform=all | ||
+ | | scope=global | ||
+ | }} | ||
+ | {{Description | ||
+ | |text=Contains information about the constructors for a class via the [[Introspection]] system. | ||
+ | }} | ||
+ | <dynamicTable id="Properties" super="MemberInfo" class="propertyTable" title="Properties" columns="3"> | ||
+ | </dynamicTable> | ||
− | |||
− | |||
+ | <dynamicTable id="Methods" super="MemberInfo" class="methodTable" title="Methods" columns="3"> | ||
+ | {{Method | name=GetParameters | description=GetParameters() as ParameterInfo()
Returns an array of ParameterInfo items }} | ||
+ | {{Method | name=Invoke | params=[params() as [[Variant]]] | returntype=Datatype of the object being instantiated. | modifiedinversion=2008r2 | description=Invoke([params() as Variant] ) as Datatype of the object being instantiated.
Invokes the constructor }} | ||
+ | </dynamicTable> | ||
+ | == Sample Code == | ||
+ | This code uses the Invoke method to call the FolderItem constructor that takes no parameters: | ||
+ | <rbcode> | ||
+ | Var ti As Introspection.TypeInfo = GetTypeInfo(FolderItem) | ||
+ | Var ci() As Introspection.ConstructorInfo = ti.GetConstructors | ||
− | = | + | Var f As FolderItem |
− | + | f = ci(0).Invoke | |
+ | </rbcode> | ||
− | == | + | ==See Also== |
+ | [[Introspection]] module; [[AttributeInfo]], [[MemberInfo]], [[MethodInfo]], [[ObjectIterator]], [[ParameterInfo]], [[PropertyInfo]], [[TypeInfo]] classes; [[GetTypeInfo]] function. | ||
− | + | [http://developer.xojo.com/xojo-introspection-constructorinfo Xojo.Introspection.ConstructorInfo] | |
− | + | [[Category:Language_Classes]] | |
− | + | [[Category:Language_Introspection]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[Category: | ||
− | [[Category: |
Latest revision as of 21:03, 28 January 2021
Class (inherits from MemberInfo)
Contains information about the constructors for a class via the Introspection system.
Properties | ||||
|
Methods | |||
|
Sample Code
This code uses the Invoke method to call the FolderItem constructor that takes no parameters:
Var ti As Introspection.TypeInfo = GetTypeInfo(FolderItem)
Var ci() As Introspection.ConstructorInfo = ti.GetConstructors
Var f As FolderItem
f = ci(0).Invoke
Var ci() As Introspection.ConstructorInfo = ti.GetConstructors
Var f As FolderItem
f = ci(0).Invoke
See Also
Introspection module; AttributeInfo, MemberInfo, MethodInfo, ObjectIterator, ParameterInfo, PropertyInfo, TypeInfo classes; GetTypeInfo function.