Partager via


DeleteItemById Method

The DeleteItemById method of the SPListItemCollection class deletes the item with the specified integer ID from the collection.

Parameters

id   A 32-bit integer that identifies the item to delete.

Remarks

The DeleteItemById method dirties the collection and thus should not be used in a foreach loop.

This method returns an ArgumentException exception if the specified ID is not found.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security