FileVersionCollection.DeleteByID method

Deletes the specified version of the file.

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

Syntax

'Declaration
Public Sub DeleteByID ( _
    vid As Integer _
)
'Usage
Dim instance As FileVersionCollection
Dim vid As Integer

instance.DeleteByID(vid)
public void DeleteByID(
    int vid
)

Parameters

  • vid
    Type: System.Int32

    Specifies the file version identifier to delete.

    The vid must not be zero.

Exceptions

Exception Condition
[Microsoft.SharePoint.SPException]

Current version cannot be deleted. Error code: -2147024710.

[Microsoft.SharePoint.SPQueryThrottledException]

List view threshold has been exceeded. Error code: -2147024860.

[Microsoft.SharePoint.SPQueryThrottledException]

Lack of resources available to process the request. Error code: -2147024749.

[System.IO.FileNotFoundException]

File with specified version identifier cannot be found. Error code: -2147024894.

[System.UnauthorizedAccessException]

The current user has insufficient permissions. Error code: -2147024891.

See also

Reference

FileVersionCollection class

FileVersionCollection members

Microsoft.SharePoint.Client namespace