Share via


FileVersionCollection.DeleteByID Method

Deletes the specified version of the file.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

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

instance.DeleteByID(vid)
[RemoteAttribute]
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