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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Sub RestoreByLabel ( _
versionLabel As String _
)
'Usage
Dim instance As SPListItemVersionCollection
Dim versionLabel As String
instance.RestoreByLabel(versionLabel)
public void RestoreByLabel(
string versionLabel
)
Parameters
versionLabel
Type: System.StringA string that specifies the version label of the version to restore. For information about the format of version labels, see VersionLabel.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | A version with the specified label does not exist in the collection. |
Remarks
This method replaces the current list item version with the version specified by the versionLabel parameter.
See Also
Reference
SPListItemVersionCollection Class