SPListItemVersionCollection.RestoreByLabel method

Restores the specified version as the current item version based on the specified version label.

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

public void RestoreByLabel(
	string versionLabel
)

Parameters

versionLabel
Type: System.String

The string that specifies the version label of the version to restore. For information about the format of version labels, see VersionLabel.

ExceptionCondition
ArgumentOutOfRangeException

A version with the specified label does not exist in the collection.

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

Show: