CodeActivity Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the CodeActivity class.
Overloads
CodeActivity() |
Initializes a new instance of the CodeActivity class. |
CodeActivity(String) |
Initializes a new instance of the CodeActivity class using the name of the activity. |
CodeActivity()
Initializes a new instance of the CodeActivity class.
public:
CodeActivity();
public CodeActivity ();
Public Sub New ()
Examples
The following code example demonstrates how to create a new instance of the CodeActivity class. The example code also creates new instances of the CodeCondition and ConditionedActivityGroup classes. This code example is part of the ConditionedActivityGroup SDK sample from the SimpleCAGWorkflow.designer.cs file. For more information, see Using ConditionedActivityGroup.
private ConditionedActivityGroup BookingCAG;
private CodeActivity Car;
private CodeActivity Airline;
this.CanModifyActivities = true;
CodeCondition codecondition1 = new CodeCondition();
CodeCondition codecondition2 = new CodeCondition();
this.BookingCAG = new ConditionedActivityGroup();
this.Car = new CodeActivity();
this.Airline = new CodeActivity();
See also
Applies to
CodeActivity(String)
Initializes a new instance of the CodeActivity class using the name of the activity.
public:
CodeActivity(System::String ^ name);
public CodeActivity (string name);
new System.Workflow.Activities.CodeActivity : string -> System.Workflow.Activities.CodeActivity
Public Sub New (name As String)
Parameters
- name
- String
The user-defined name of the activity.