ActivityCollection.Add Method (Activity)
Assembly: System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)
The following example shows access of the ActivityCollection which is the member of a composite activity class containing all child activities. This example illustrates the use of . This code example is part of the Throw SDK sample and is from the ThrowWorkflow.cs file. For more information, see Using the ThrowActivity Activity.
Me.CanModifyActivities = True Dim activitybind1 As New System.Workflow.ComponentModel.ActivityBind() Me.throwActivity1 = New System.Workflow.ComponentModel.ThrowActivity() activitybind1.Name = "ThrowWorkflow" activitybind1.Path = "ThrownException" ' ' throwActivity1 ' Me.throwActivity1.Name = "throwActivity1" Me.throwActivity1.SetBinding(System.Workflow.ComponentModel.ThrowActivity.FaultProperty, activitybind1) ' ' ThrowWorkflow ' Me.Activities.Add(Me.throwActivity1) Me.Name = "ThrowWorkflow" Me.CanModifyActivities = False
Available since 3.0