Difference between revisions of "Xojo.Introspection.MemberInfo.Name"

From Xojo Documentation

(Created page with "{{PropertyBox | name=Name | owner=Xojo.Introspection.MemberInfo | ownertype=class | readonly=yes | scope=public | type=Text }} {{Description | text = The name of the i...")
 
 
Line 14: Line 14:
 
Using Xojo.Introspection
 
Using Xojo.Introspection
  
Dim obj As New Class1
+
Var obj As New Class1
Dim info As TypeInfo = GetType(obj)
+
Var info As TypeInfo = GetType(obj)
Dim methods() As MethodInfo = info.Methods
+
Var methods() As MethodInfo = info.Methods
 
    
 
    
Dim methodNames() As Text
+
Var methodNames() As Text
 
For Each m As MethodInfo In methods
 
For Each m As MethodInfo In methods
   methodNames.Append(m.Name)
+
   methodNames.AddRow(m.Name)
 
Next
 
Next
 
</rbcode>
 
</rbcode>

Latest revision as of 17:55, 11 August 2019

Read-Only Property (As Text )
TextValue = aXojo.Introspection.MemberInfo.Name

Supported for all project types and targets.

The name of the item.

Sample Code

Gets the names of methods on a class:

Using Xojo.Introspection

Var obj As New Class1
Var info As TypeInfo = GetType(obj)
Var methods() As MethodInfo = info.Methods

Var methodNames() As Text
For Each m As MethodInfo In methods
methodNames.AddRow(m.Name)
Next