SPListItemVersionCollection.RestoreByID method

Restores the version with the specified version as the current item version based on the specified version ID.

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

public void RestoreByID(
	int versionId
)

Parameters

versionId
Type: System.Int32

A 32-bit integer that specifies the ID of the version to return: for example, 512, 1024, or 1536. For more information, see VersionId.

ExceptionCondition
ArgumentOutOfRangeException

A version with the specified ID does not exist in the collection

This method replaces the current list item version with the version specified by the versionId parameter.

Show: