Add Method
See Also 
SourceCode.Framework Namespace > PersistableObjectCollectionBase<TParent,TItem> 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 Overridable Function Add( _
   ByVal item As TItem _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As PersistableObjectCollectionBase(Of TParent,TItem)
Dim item As TItem
Dim value As Integer
 
value = instance.Add(item)
C# 
public virtual int Add( 
   TItem item
)
C++/CLI 
public:
virtual int Add( 
   TItem^ item
) 

Parameters

item
The Item to add.

Return Value

The Item index at which the object has been 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