| PropertySupportExtractPropertyNameT, TProperty Method (ExpressionFuncT, TProperty) |
Extracts the property name from a property expression.
Namespace:
TomsToolbox.Essentials
Assembly:
TomsToolbox.Essentials (in TomsToolbox.Essentials.dll)
Syntax public static string ExtractPropertyName<T, TProperty>(
Expression<Func<T, TProperty>> propertyExpression
)
Public Shared Function ExtractPropertyName(Of T, TProperty) (
propertyExpression As Expression(Of Func(Of T, TProperty))
) As String
Parameters
- propertyExpression
- Type: System.Linq.ExpressionsExpressionFuncT, 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
Type:
StringThe name of the property.
Exceptions See Also