LambdaExpression.Compile Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Produces a delegate that represents the lambda expression.

Namespace:  System.Linq.Expressions
Assembly:  System.Core (in System.Core.dll)

Syntax

'Declaration
Public Function Compile As Delegate
public Delegate Compile()

Return Value

Type: System.Delegate
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.

Platform Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 LambdaExpression.Compile is not supported in Windows Phone SDK.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.