Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds an object to the collection and, if the object already exists, reinitializes it with the data of the existing object.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Overridable Function Ensure ( _
newObj As T _
) As T
'Usage
Dim instance As SPPersistedChildCollection
Dim newObj As T
Dim returnValue As T
returnValue = instance.Ensure(newObj)
public virtual T Ensure(
T newObj
)
Parameters
newObj
Type: TThe object to add to the collection. If the object exists in the collection, it is reinitialized with the data of the existing object.
Return Value
Type: T
The object that was added or updated.
See Also
Reference
SPPersistedChildCollection<T> Class