 | PropertyUtilsTTypeGetPropertyInfoTValue Method |
Can be used to get the property info of a known class property.
Usage:
PropertyInfo propertyInfo = PropertyUtils{ClassType}.GetPropertyInfo(x => x.Property);
Namespace: Slash.Reflection.UtilsAssembly: Slash.Reflection (in Slash.Reflection.dll) Version: 1.0.6018.40175
Syntaxpublic static PropertyInfo GetPropertyInfo<TValue>(
Expression<Func<TType, TValue>> selector
)
Public Shared Function GetPropertyInfo(Of TValue) (
selector As Expression(Of Func(Of TType, TValue))
) As PropertyInfo
public:
generic<typename TValue>
static PropertyInfo^ GetPropertyInfo(
Expression<Func<TType, TValue>^>^ selector
)
static member GetPropertyInfo :
selector : Expression<Func<'TType, 'TValue>> -> PropertyInfo
Parameters
- selector
- Type: System.Linq.ExpressionsExpressionFuncTType, TValue
Lambda expression in this form: x => x.PropertyName.
Type Parameters
- TValue
- Property type.
Return Value
Type:
PropertyInfo Property info of property with property name "PropertyName" of specified class.
See Also