ReflectionExtensions.GetAutomaticProperty Method (FieldInfo, Boolean) |
Gets the PropertyInfo whose a given field is the backing field and specifies whether base types should be considered.
Namespace: PostSharp.Reflection
Assembly: PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
public static PropertyInfo GetAutomaticProperty( this FieldInfo field, bool inherit )
Parameters
- field
- Type: System.Reflection.FieldInfo
A field. - inherit
- Type: System.Boolean
true if the property should be looked for in the base, otherwise false.
Return Value
Type: PropertyInfoThe PropertyInfo representing the property whose field is the backing field, or null if field is not the backing field of an automatic property.