LambdaExpression.Compile LambdaExpression.Compile LambdaExpression.Compile Method

Definition

Produces a delegate that represents the lambda expression.

Overloads

Compile() Compile() Compile()

Produces a delegate that represents the lambda expression.

Compile(Boolean) Compile(Boolean) Compile(Boolean)

Produces an interpreted or compiled delegate that represents the lambda expression.

Compile(DebugInfoGenerator) Compile(DebugInfoGenerator)

Produces a delegate that represents the lambda expression.

Compile() Compile() Compile()

Produces a delegate that represents the lambda expression.

public:
 Delegate ^ Compile();
public Delegate Compile ();
Public Function Compile () As Delegate
Returns

A Delegate that contains the compiled version of the lambda expression.

Remarks

The Compile method can be used to convert a LambdaExpression expression tree into the delegate that it represents.

Compile(Boolean) Compile(Boolean) Compile(Boolean)

Produces an interpreted or compiled delegate that represents the lambda expression.

public:
 Delegate ^ Compile(bool preferInterpretation);
public Delegate Compile (bool preferInterpretation);
Public Function Compile (preferInterpretation As Boolean) As Delegate
Parameters
preferInterpretation
Boolean Boolean Boolean

true to indicate that the expression should be compiled to an interpreted form, if it's available; otherwise, false.

Returns

A delegate that represents the compiled lambda expression described by the LambdaExpression object.

Compile(DebugInfoGenerator) Compile(DebugInfoGenerator)

Produces a delegate that represents the lambda expression.

public:
 Delegate ^ Compile(System::Runtime::CompilerServices::DebugInfoGenerator ^ debugInfoGenerator);
public Delegate Compile (System.Runtime.CompilerServices.DebugInfoGenerator debugInfoGenerator);
Parameters
debugInfoGenerator
DebugInfoGenerator DebugInfoGenerator DebugInfoGenerator

Debugging information generator used by the compiler to mark sequence points and annotate local variables.

Returns

A delegate containing the compiled version of the lambda.

Applies to