IsAutoPropertyBackingField(IField)
Determines whether the specified field is a compiler-generated backing field for an auto-property.
Declaration
public static bool IsAutoPropertyBackingField(this IField field)Parameters
| Type | Name | Description |
|---|---|---|
| IField | field | The field to check. |
Returns
| Type | Description |
|---|---|
| bool |
|
Remarks
Compiler-generated backing fields follow the naming pattern <PropertyName>k__BackingField.
This method efficiently checks only the field name pattern.