| PropertySupportTryExtractPropertyNameT, TProperty(ExpressionFuncT, TProperty) Method |
Extracts the property name from a property expression.
Namespace: TomsToolbox.EssentialsAssembly: TomsToolbox.Essentials (in TomsToolbox.Essentials.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax public static string? TryExtractPropertyName<T, TProperty>(
Expression<Func<T, TProperty>> propertyExpression
)
Public Shared Function TryExtractPropertyName(Of T, TProperty) (
propertyExpression As Expression(Of Func(Of T, TProperty))
) As String
Parameters
- propertyExpression ExpressionFuncT, TProperty
- The property expression (e.g. p => p.PropertyName) to extract the property name from.
Type Parameters
- T
- The object type containing the property specified in the expression.
- TProperty
- The property type.
Return Value
StringThe name of the property, or null if the extraction fails.
See Also