Add Method
See Also 
SourceCode.Workflow.Authoring Namespace > ActivityCollection Class : Add Method



item
The Item to add.

Glossary Item Box

Add the specified Item to the collection. This will set the container property of the item as well as raise the ItemAdded event on the Container object.

Syntax

Visual Basic (Declaration) 
Public Overrides Function Add( _
   ByVal item As Activity _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As ActivityCollection
Dim item As Activity
Dim value As Integer
 
value = instance.Add(item)
C# 
public override int Add( 
   Activity item
)
C++/CLI 
public:
int Add( 
   Activity^ item
) override 

Parameters

item
The Item to add.

Return Value

The Item index at which the object has been added.

Exceptions

ExceptionDescription
SourceCode.Framework.DuplicateNameExceptionThrows an exception if a duplicate item was added

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also