Difference between revisions of "PropertyInfo.PropertyType"

From Xojo Documentation

(Example)
Line 17: Line 17:
 
Var d As New Date
 
Var d As New Date
 
Var myProperties() As Introspection.PropertyInfo = Introspection.GetType(d).GetProperties
 
Var myProperties() As Introspection.PropertyInfo = Introspection.GetType(d).GetProperties
For Each prop As Introspection.PropertyInfo in myProperties
+
For Each prop As Introspection.PropertyInfo In myProperties
 
   ListBox1.AddRow(prop.PropertyType.FullName)
 
   ListBox1.AddRow(prop.PropertyType.FullName)
 
Next
 
Next
 
</rbcode>
 
</rbcode>

Revision as of 17:23, 12 November 2019

Property (As TypeInfo )
aPropertyInfo.PropertyType = newTypeInfoValue
or
TypeInfoValue = aPropertyInfo.PropertyType

Supported for all project types and targets.

Contains the property's datatype.

Example

This example gets the data type of each property of the Date class.

Var d As New Date
Var myProperties() As Introspection.PropertyInfo = Introspection.GetType(d).GetProperties
For Each prop As Introspection.PropertyInfo In myProperties
ListBox1.AddRow(prop.PropertyType.FullName)
Next