Click or drag to resize

PropertySupportTryExtractPropertyNameTProperty(ExpressionFuncTProperty) Method

Extracts the property name from a property expression.

Namespace: TomsToolbox.Essentials
Assembly: TomsToolbox.Essentials (in TomsToolbox.Essentials.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
public static string? TryExtractPropertyName<TProperty>(
	Expression<Func<TProperty>> propertyExpression
)

Parameters

propertyExpression  ExpressionFuncTProperty
The property expression (e.g. () => p.PropertyName) to extract the property name from.

Type Parameters

TProperty
The property type.

Return Value

String
The name of the property, or null if the extraction fails.
See Also