Share via


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)

Syntax

'Declaration
Public Sub Restore ( _
    iIndex As Integer _
)
'Usage
Dim instance As SPListItemVersionCollection
Dim iIndex As Integer

instance.Restore(iIndex)
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.

Exceptions

Exception Condition
ArgumentOutOfRangeException

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

Remarks

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

See also

Reference

SPListItemVersionCollection class

SPListItemVersionCollection members

Microsoft.SharePoint namespace