PostSharp / / API Reference / Post­Sharp.​Reflection / Reflection­Extensions / Get­Backing­Field
Open sandbox

Method GetBackingField

GetBackingField(PropertyInfo)

Gets the backing field of a given property.

Declaration
public static FieldInfo GetBackingField(this PropertyInfo propertyInfo)
Parameters
Type Name Description
PropertyInfo propertyInfo

A property.

Returns
Type Description
FieldInfo

The FieldInfo representing the backing field of propertyInfo, or null if propertyInfo is not an automatic property.