ReflectionExtensions.GetAutomaticProperty Method
GetAutomaticProperty(FieldInfo)
Gets the System.Reflection.PropertyInfo whose a given field is the backing field from the current type or base types.
Declaration
public static PropertyInfo GetAutomaticProperty(this FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | A field. |
Returns
Type | Description |
---|---|
System.Reflection.PropertyInfo | The System.Reflection.PropertyInfo representing the property whose |
GetAutomaticProperty(FieldInfo, Boolean)
Gets the System.Reflection.PropertyInfo whose a given field is the backing field and specifies whether base types should be considered.
Declaration
public static PropertyInfo GetAutomaticProperty(this FieldInfo field, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | A field. |
Boolean | inherit |
|
Returns
Type | Description |
---|---|
System.Reflection.PropertyInfo | The System.Reflection.PropertyInfo representing the property whose |