SPPersistedChildCollection<T>.Add method

Adds an object to the collection.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Overridable Function Add ( _
    newObj As T _
) As T
'Usage
Dim instance As SPPersistedChildCollection
Dim newObj As T
Dim returnValue As T

returnValue = instance.Add(newObj)
public virtual T Add(
    T newObj
)

Parameters

  • newObj
    Type: T

    The object to add to the collection.

Return value

Type: T
The object that was added.

Exceptions

Exception Condition
ArgumentException

The object already exists in the collection.

See also

Reference

SPPersistedChildCollection<T> class

SPPersistedChildCollection<T> members

Microsoft.SharePoint.Administration namespace