Edit

Share via


SetStateActivity Constructors

Definition

Initializes a new instance of the SetStateActivity class.

Overloads

SetStateActivity()

Initializes a new instance of the SetStateActivity class.

SetStateActivity(String)

Initializes a new instance of the SetStateActivity class using the name of the activity.

SetStateActivity()

Initializes a new instance of the SetStateActivity class.

public:
 SetStateActivity();
public SetStateActivity ();
Public Sub New ()

Examples

The following code example shows how to create a new instance of the SetStateActivity class. This code example is part of the SimpleStateMachineWorkflow SDK Sample from the StateMachineWorkflow.cs file. For more information, see Simple State Machine.

public partial class StateMachineWorkflow : StateMachineWorkflowActivity
{
    public StateMachineWorkflow()
    {
        InitializeComponent();
    }

    private void Code1Handler(object sender, EventArgs e)
    {
        Console.WriteLine("In Start State. Transitioning to State 1");
    }

    private void Code2Handler(object sender, EventArgs e)
    {
        Console.WriteLine("In State 1. Transitioning to Completed State");
    }
}

See also

Applies to

SetStateActivity(String)

Initializes a new instance of the SetStateActivity class using the name of the activity.

public:
 SetStateActivity(System::String ^ name);
public SetStateActivity (string name);
new System.Workflow.Activities.SetStateActivity : string -> System.Workflow.Activities.SetStateActivity
Public Sub New (name As String)

Parameters

name
String

The user-defined name of the activity.

See also

Applies to