Aracılığıyla paylaş


FileVersionCollection.DeleteByLabel Method

Deletes the file version object with the specified version label.

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 DeleteByLabel ( _
    versionlabel As String _
)
'Usage
Dim instance As FileVersionCollection
Dim versionlabel As String

instance.DeleteByLabel(versionlabel)
[RemoteAttribute]
public void DeleteByLabel(
    string versionlabel
)

Parameters

  • versionlabel
    Type: System.String

    Specifies the version label.

    It must not be a null reference (Nothing in Visual Basic). It must not be empty. Version label must be the return value from VersionLabel property of a Microsoft.Sharepoint.Client.FileVersion object

Exceptions

Exception Condition
[Microsoft.SharePoint.SPException]

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

[Microsoft.SharePoint.SPQueryThrottledException]

Attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator. Error code: -2147024860.

[Microsoft.SharePoint.SPQueryThrottledException]

Insufficient system resources are available to process the request. Error code: -2147024749.

[System.ArgumentException]

Version label must be the return value from VersionLabel property of a Microsoft.Sharepoint.Client.FileVersion object. Error code: -2147024809.

[System.IO.FileNotFoundException]

Specified version label is invalid. 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