SPPersistedObjectCollection<T> Class

Provides a base class for collections that manage SPPersistedObject objects.

Inheritance Hierarchy


Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No


<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public MustInherit Class SPPersistedObjectCollection(Of T As SPPersistedObject) _
    Implements IEnumerable(Of T), IEnumerable
Dim instance As SPPersistedObjectCollection(Of T)
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public abstract class SPPersistedObjectCollection<T> : IEnumerable<T>, 
where T : SPPersistedObject

Type Parameters

  • T
    The type of object contained in the collection.


Use an indexer to return a single persisted object from the collection. For example, if the collection is assigned to a variable named myPersistedObjects, use myPersistedObjects[index] in C#, or myPersistedObjects(index) in Visual Basic, where index is either the name or the GUID that identifies the persisted object in the collection.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


SPPersistedObjectCollection<T> Members

Microsoft.SharePoint.Administration Namespace