TypeInfo
From Real Software Documentation
Class (inherits from MemberInfo)
Gets information about a program’s structure. It is an abstract class whose properties and functions describe all the attributes or members a datatype might have.
| Properties | |||||||||||||||
|
| Methods | ||||||||
|
Examples
The following returns PropertyInfo and MethodInfo arrays containing the properties and methods of the passed class instance.
Dim d as New Date
Dim myProperties() as Introspection.PropertyInfo = _
Introspection.GetType(d).GetProperties
Dim myMethods() As Introspection.MethodInfo = _
Introspection.GetType(d).GetMethods
//display the properties...
For i as Integer=0 to Ubound(myProperties)
ListBox1.AddRow myProperties(i).Name
Next
Dim myProperties() as Introspection.PropertyInfo = _
Introspection.GetType(d).GetProperties
Dim myMethods() As Introspection.MethodInfo = _
Introspection.GetType(d).GetMethods
//display the properties...
For i as Integer=0 to Ubound(myProperties)
ListBox1.AddRow myProperties(i).Name
Next
This example gets the ConstructorInfo for the FolderItem class and creates a new instance of a FolderItem.
Dim ti as Introspection.Typeinfo=GetTypeInfo(FolderItem)
Dim ci() as Introspection.ConstructorInfo=ti.GetConstructors
Dim f as FolderItem
f=ci(0).invoke
Dim ci() as Introspection.ConstructorInfo=ti.GetConstructors
Dim f as FolderItem
f=ci(0).invoke
See Also
Introspection module; AttributeInfo, ConstructorInfo, MemberInfo, MethodInfo, ObjectIterator, ParameterInfo, PropertyInfo classes; GetTypeInfo function.
