PostSharpAPI ReferencePost­Sharp.​ReflectionReflection­ExtensionsGet­Backing­Field
Open sandboxFocus

ReflectionExtensions.GetBackingField Method

GetBackingField(PropertyInfo)

Gets the backing field of a given property.

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

A property.

Returns
Type Description
System.Reflection.FieldInfo

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