This documentation is archived and is not being maintained.

ExpressionServices.Convert<TResult> Method

Converts a workflow environment-aware expression to an activity tree.

Namespace:  System.Activities.Expressions
Assembly:  System.Activities (in System.Activities.dll)

public static Activity<TResult> Convert<TResult>(
	Expression<Func<ActivityContext, TResult>> expression
)

Type Parameters

TResult

The type the expression is being converted to.

Parameters

expression
Type: System.Linq.Expressions.Expression<Func<ActivityContext, TResult>>
The expression being converted.

Return Value

Type: System.Activities.Activity<TResult>
The converted expression.

For a code example of Convert<TResult>(Expression<Func<ActivityContext, TResult>>), see ConvertReference<TResult>(Expression<Func<ActivityContext, TResult>>).

The conversion methods in ExpressionServices are designed to work with variables and constants defined inside the workflow, or passed into the workflow via arguments.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: