ExpressionExtensions.MakeMemberAccess(Expression, MemberInfo) Method

Definition

Creates a MemberExpression that represents accessing either a field or a property.

public static System.Linq.Expressions.MemberExpression MakeMemberAccess (this System.Linq.Expressions.Expression expression, System.Reflection.MemberInfo member);
public static System.Linq.Expressions.MemberExpression MakeMemberAccess (this System.Linq.Expressions.Expression? expression, System.Reflection.MemberInfo member);
static member MakeMemberAccess : System.Linq.Expressions.Expression * System.Reflection.MemberInfo -> System.Linq.Expressions.MemberExpression
<Extension()>
Public Function MakeMemberAccess (expression As Expression, member As MemberInfo) As MemberExpression

Parameters

expression
Expression

An Expression that represents the object that the member belongs to.

member
MemberInfo

The MemberInfo that describes the field or property to be accessed.

Returns

The MemberExpression that results from calling the appropriate factory method.

Applies to