System.Reflection.PropertyInfo.CanRead Property

Gets a value indicating whether the property can be read.

Syntax

public abstract bool CanRead { get; }

Value

true if the property reflected by the current instance has a Get accessor; otherwise, false .

Remarks

If the property does not have a get accessor, it cannot be read.

To get the CanRead property, first get the class Type. From the Type, get the PropertyInfo. From the PropertyInfo, get the CanRead value.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0