次の方法で共有


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)

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.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.

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

SPListItemVersionCollection members

Microsoft.SharePoint namespace