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)
Visual Basic (Declaration)
<ToolboxBitmapAttribute(GetType(CodeActivity), "Resources.code.png")> _
Public NotInheritable Class CodeActivity _
Inherits Activity
Dim instance As CodeActivity
[ToolboxBitmapAttribute(typeof(CodeActivity), "Resources.code.png")]
public sealed class CodeActivity : Activity
[ToolboxBitmapAttribute(typeof(CodeActivity), L"Resources.code.png")]
public ref class CodeActivity sealed : public Activity
public final class CodeActivity extends 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.
System..::.Object
System.Workflow.ComponentModel..::.DependencyObject
System.Workflow.ComponentModel..::.Activity
System.Workflow.Activities..::.CodeActivity
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
Reference
Other Resources