Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Restores the specified version as the current item version based on the specified version ID.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Sub RestoreByID ( _
versionId As Integer _
)
'Usage
Dim instance As SPListItemVersionCollection
Dim versionId As Integer
instance.RestoreByID(versionId)
public void RestoreByID(
int versionId
)
Parameters
versionId
Type: System.Int32A 32-bit integer that specifies the ID of the version to return: for example, 512, 1024, or 1536. For more information, see VersionId.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | A version with the specified ID does not exist in the collection |
Remarks
This method replaces the current list item version with the version specified by the versionId parameter.
See Also
Reference
SPListItemVersionCollection Class