Click or drag to resize

ModelExtensionsGetPropertyNameT Method (ExpressionFuncT, Boolean)

Gets the property name from an Expression.

Read our blog on this topic: Effective Extensions, Part 3 – Extending Models in C#

Namespace:  Xcalibur.Extensions
Assembly:  Xcalibur.Extensions (in Xcalibur.Extensions.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
public static string GetPropertyName<T>(
	this Expression<Func<T, bool>> expression
)

Parameters

expression
Type: System.Linq.ExpressionsExpressionFuncT, Boolean
The expression.

Type Parameters

T

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ExpressionFuncT, Boolean. 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).
See Also