Difference between revisions of "ConstructorInfo"

From Xojo Documentation

(See Also)
m
Line 7: Line 7:
 
|text=Contains information about the constructors for a class via the [[Introspection]] system.
 
|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 id="Properties" super="MemberInfo" class="propertyTable" title="Properties" columns="3">
Line 18: Line 16:
 
{{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.&#x0A;Invokes the constructor }}
 
{{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.&#x0A;Invokes the constructor }}
 
</dynamicTable>
 
</dynamicTable>
 
  
 
==Examples==
 
==Examples==

Revision as of 21:47, 23 August 2017

Class (inherits from MemberInfo)

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

Properties
IsPrivate fa-lock-32.png IsPublic fa-lock-32.png
IsProtected fa-lock-32.png Name fa-lock-32.png


Methods
GetAttributes GetParameters Invoke

Examples

This example uses the Invoke method to call the FolderItem constructor that takes no parameters:

Dim ti As Introspection.TypeInfo = GetTypeInfo(FolderItem)
Dim ci() As Introspection.ConstructorInfo = ti.GetConstructors

Dim f As FolderItem
f = ci(0).Invoke

See Also

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

Xojo.Introspection.ConstructorInfo