Export (0) Print
Expand All

CodeActivity Class

Runs the code-beside method associated with an activity. This class cannot be inherited.

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

[ToolboxBitmapAttribute(typeof(CodeActivity), "Resources.code.png")]
public sealed class CodeActivity : Activity

Code-beside methods invoked by CodeActivity are executed in a synchronous manner; CodeActivity does not yield its thread until the thread is finished. Therefore, the execution of the code-beside method is expected to be performed and should not block with a dependency on some external resource. For example, the code-beside method should typically not invoke a Web service.

The typical use of the CodeActivity is to examine workflow instance state, and change local variables and messages.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2015 Microsoft