Difference between revisions of "MemberInfo"
From Xojo Documentation
m (1 revision) |
(→Examples) |
||
(22 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{ClassBox | ||
+ | | super=[[Object]] | ||
+ | | platform=all | ||
+ | | scope=global | ||
+ | }} | ||
+ | {{Description | ||
+ | |text = '''MemberInfo''' is the super class for the [[AttributeInfo]], [[MethodInfo]], [[PropertyInfo]], and [[TypeInfo]] classes in the [[Introspection]] system. }} | ||
+ | <dynamicTable id="Properties" class="propertyTable" title="Properties" columns="3"> | ||
+ | {{Property | name=IsPrivate | type=Boolean | readonly=yes | newinversion=2008r3 | description=( Boolean) If True, the item has Private scope. }} | ||
+ | {{Property | name=IsProtected | type=Boolean | readonly=yes | newinversion=2008r3 | description=( Boolean) Is True, the item has Protected scope. }} | ||
+ | {{Property | name=IsPublic | type=Boolean | readonly=yes | newinversion=2008r3 | description=( Boolean) If True, the item has Public scope. }} | ||
+ | {{Property | name=Name | type=String | readonly=yes | description=( String) The name of the item. }} | ||
+ | </dynamicTable> | ||
− | == | + | <dynamicTable id="Methods" class="methodTable" title="Methods" columns="3"> |
− | + | {{Method | name=GetAttributes | returntype=[[AttributeInfo]]() | description=GetAttributes() As AttributeInfo()
Returns an array of AttributeInfo objects. }} | |
+ | </dynamicTable> | ||
− | + | ==Examples== | |
− | |||
− | == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
The following reports the name of the class instance. | The following reports the name of the class instance. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <rbcode> | |
− | + | Var d As New DateTime.Now | |
+ | Var t As Introspection.TypeInfo = Introspection.GetType(d) | ||
+ | MessageBox("My class name is " + t.Name + ".") | ||
+ | </rbcode> | ||
The following gets the attributes of window1. | The following gets the attributes of window1. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | <rbcode> | ||
+ | Var myAttributes() As Introspection.AttributeInfo= _ | ||
+ | Introspection.GetType(Window1).GetAttributes | ||
+ | </rbcode> | ||
− | == | + | ==See Also== |
− | [[ | + | [[Introspection]] module; [[AttributeInfo]], [[ConstructorInfo]], [[MethodInfo]], [[ObjectIterator]], [[ParameterInfo]], [[PropertyInfo]], [[TypeInfo]] classes; [[GetTypeInfo]] function. |
+ | [http://developer.xojo.com/xojo-introspection Xojo.Introspection] | ||
− | [[Category: | + | [[Category:Language_Classes]] |
− | [[Category: | + | [[Category:Language_Introspection]] |
Latest revision as of 02:16, 23 January 2022
Class (inherits from Object)
MemberInfo is the super class for the AttributeInfo, MethodInfo, PropertyInfo, and TypeInfo classes in the Introspection system.
Properties | ||||
|
Methods | |
|
Examples
The following reports the name of the class instance.
Var d As New DateTime.Now
Var t As Introspection.TypeInfo = Introspection.GetType(d)
MessageBox("My class name is " + t.Name + ".")
Var t As Introspection.TypeInfo = Introspection.GetType(d)
MessageBox("My class name is " + t.Name + ".")
The following gets the attributes of window1.
See Also
Introspection module; AttributeInfo, ConstructorInfo, MethodInfo, ObjectIterator, ParameterInfo, PropertyInfo, TypeInfo classes; GetTypeInfo function.