共用方式為


FileVersionCollection.DeleteByLabel 方法

刪除具有指定版本標籤的檔案版本物件。

命名空間:  Microsoft.SharePoint.Client
組件:   Microsoft.SharePoint.Client.Silverlight (在 Microsoft.SharePoint.Client.Silverlight.dll 中);  Microsoft.SharePoint.Client.Phone (在 Microsoft.SharePoint.Client.Phone.dll 中)  Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)

語法

'宣告
Public Sub DeleteByLabel ( _
    versionlabel As String _
)
'用途
Dim instance As FileVersionCollection
Dim versionlabel As String

instance.DeleteByLabel(versionlabel)
public void DeleteByLabel(
    string versionlabel
)

參數

  • versionlabel
    類型:System.String

    指定版本標籤。

    它不能null 參考 (未執行任何動作 於 Visual Basic 中)。它必須不是空的。版本標籤必須是從VersionLabel物件的屬性FileVersion傳回的值。

例外狀況

例外狀況 條件
SPException

您無法刪除目前的版本。錯誤碼 ︰-2147024710。

SPQueryThrottledException

因為超過清單檢視閥值強制執行由系統管理員,因此禁止嘗試的作業。錯誤碼 ︰-2147024860。

SPQueryThrottledException

系統資源不足,可處理要求。錯誤碼 ︰-2147024749。

ArgumentException

版本標籤必須是從VersionLabel物件的屬性FileVersion傳回的值。錯誤碼 ︰-2147024809。

[System.IO.FileNotFoundException]

指定的版本標籤不正確。錯誤碼 ︰-2147024894。

[System.UnauthorizedAccessException]

目前的使用者會有足夠的權限。錯誤碼 ︰-2147024891。

請參閱

參照

FileVersionCollection 類別

FileVersionCollection 成員

Microsoft.SharePoint.Client 命名空間