Open sandboxFocus

Method ToExpression

ToExpression(MemberInfo)

Returns the IExpression representation of the given MemberInfo, when available, or throws an exception.

Declaration
public static IExpression ToExpression(this MemberInfo memberInfo)
Parameters
Type Name Description
MemberInfo memberInfo

The member info to convert.

Returns
Type Description
IExpression

An IExpression representing the member.

Exceptions
Type Condition
InvalidOperationException

The member cannot be converted to an expression.

ToExpression(ParameterInfo)

Returns the IExpression representation of the given ParameterInfo, when available, or throws an exception.

Declaration
public static IExpression ToExpression(this ParameterInfo parameterInfo)
Parameters
Type Name Description
ParameterInfo parameterInfo

The parameter info to convert.

Returns
Type Description
IExpression

An IExpression representing the parameter.

Exceptions
Type Condition
InvalidOperationException

The parameter cannot be converted to an expression.