Starts the execution of the workflow instance.
Assembly: System.Workflow.Runtime (in System.Workflow.Runtime.dll)
The workflow runtime engine is not running.
The workflow instance has already been started.
The following code example demonstrates how you can use the method to start a WorkflowInstance in a workflow host. The code creates an instance of the WorkflowRuntime, adds services to the runtime, and then demonstrates the recommended way to create a WorkflowInstance object. It creates a Type object and casts it to one of the workflow objects with which the host is associated. The code next initializes WorkflowInstance by calling the CreateWorkflow method and passing the previously created type to it. The WorkflowInstance is started with the method call.
This code example is part of the Canceling a Workflow SDK sample from the Program.cs file. For more information, see Canceling a Workflow.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
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.