SPPersistedChildCollection<T>.Ensure method
會將物件新增至集合,並如果物件已存在,時重新加以初始化的現有物件的資料。
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Overridable Function Ensure ( _
newObj As T _
) As T
'用途
Dim instance As SPPersistedChildCollection
Dim newObj As T
Dim returnValue As T
returnValue = instance.Ensure(newObj)
public virtual T Ensure(
T newObj
)
參數
newObj
Type: T要新增至集合中的物件。集合中物件存在,則會重新初始化的現有物件的資料。
傳回值
Type: T
已新增或更新物件。
請參閱
參照
SPPersistedChildCollection<T> class