SPListItemVersionCollection.Restore method

Restores the specified version as the current item version based on the specified index in the collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public void Restore(
	int iIndex
)

Parameters

iIndex
Type: System.Int32

A 32-bit integer that specifies the index in the collection of the version to restore.

ExceptionCondition
ArgumentOutOfRangeException

The iIndex is outside the range of the list item version collection.

This method replaces the current list item version with the version in the collection specified by the iIndex parameter.

Show: