ReflectionHelperGetPropertyTOwner, TProperty Method | |
Namespace: Lawo.ReflectionAssembly: Lawo (in Lawo.dll) Version: 1.4.1707.27006
Syntax public static IProperty<TOwner, TProperty> GetProperty<TOwner, TProperty>(
this TOwner owner,
Expression<Func<TOwner, TProperty>> getPropertyExpression
)
Parameters
- owner
- Type: TOwner
The owner object. - getPropertyExpression
- Type: System.Linq.ExpressionsExpressionFuncTOwner, TProperty
An expression calling the getter of a property, for example
s => s.Length.
Type Parameters
- TOwner
- The type of owner.
- TProperty
- The type of the property identified by getPropertyExpression.
Return Value
Type:
IPropertyTOwner,
TPropertyUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions Exception | Condition |
---|
ArgumentException | The expression passed for getPropertyExpression does
not return the value of a property. |
ArgumentNullException | owner and/or
getPropertyExpression equal null. |
See Also