WorkflowCompletedEventArgs.OutputParameters Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the output from the workflow.

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

public Dictionary<string, object> OutputParameters { get; }

Property Value

Type: System.Collections.Generic.Dictionary<String, Object>

A Dictionary<TKey, TValue> of values keyed by parameter name that contains the output parameters of the workflow.

OutputParameters contains the out and ref parameters of the workflow.

The following code example demonstrates how to obtain a value from a key stored in the OutputParameters property. The OnWorkflowCompleted method has a parameter that takes a WorkflowCompletedEventArgs. This method is called when the WorkflowCompleted event is raised. The code uses the OutputParameters property to obtain the value associated with the Status key and writes it to the console.

This code example is part of the Sequential Workflow with Parameters SDK Sample from the Program.cs file. For more information, see Sequential Workflow With Parameters.

static void OnWorkflowCompleted(object sender, WorkflowCompletedEventArgs e)
    //The order status is stored in the "status" "out" parameter
    string orderStatus = e.OutputParameters["Status"].ToString();
    Console.WriteLine("Order was " + orderStatus);

.NET Framework
Available since 3.0
Return to top