SPListItemCollection.DeleteItemById 方法
Deletes the item with the specified integer ID from the collection.
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Sub DeleteItemById ( _
id As Integer _
)
用法
Dim instance As SPListItemCollection
Dim id As Integer
instance.DeleteItemById(id)
public void DeleteItemById(
int id
)
参数
id
类型:System.Int32A 32-bit integer that identifies the item to delete.
异常
异常 | 条件 |
---|---|
ArgumentException | An item with the specified ID could not be found. |
备注
This DeleteItemById method modifies the collection and thus should not be used in a foreach loop.