PropertyInfo.CanWrite

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Boolean )
aPropertyInfo.CanWrite = newBooleanValue
or
BooleanValue = aPropertyInfo.CanWrite

Supported for all project types and targets.

If True, the property is a simple value property or has a Set accessor.

Example

This example checks the CanRead property before taking an action.

Var d As New DateTime = DateTime.Now
Var myProperties() As Introspection.PropertyInfo = Introspection.GetType(d).GetProperties
For Each prop As Introspection.PropertyInfo In myProperties
If prop.CanWrite Then
// take action here
End If
Next