Method GetFieldPath
GetFieldPath<TType, TValue>(Expression<Func<TType, TValue>>)
Returns a string path from an expression - mostly used to retrieve serialized properties without hardcoding the field path. Safer, and allows for proper refactoring.
Declaration
public static string GetFieldPath<TType, TValue>(Expression<Func<TType, TValue>> expr)
Parameters
| Type | Name | Description |
|---|---|---|
| Expression<Func<TType, TValue>> | expr |
Returns
| Type | Description |
|---|---|
| string |
Type Parameters
| Name | Description |
|---|---|
| TType | |
| TValue |