共用方式為


SPAttachmentCollection.Delete method

從集合中刪除指定的檔名的附件。

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

Syntax

'宣告
Public Sub Delete ( _
    leafName As String _
)
'用途
Dim instance As SPAttachmentCollection
Dim leafName As String

instance.Delete(leafName)
public void Delete(
    string leafName
)

參數

  • leafName
    Type: System.String

    若要刪除的附件檔案名稱。

Exceptions

Exception Condition
ArgumentOutOfRangeException

leafName不存在於集合中。

備註

使用此方法刪除附件的處理程序需要更新的清單項目,以重新整理版本資訊。

請參閱

參照

SPAttachmentCollection class

SPAttachmentCollection members

Microsoft.SharePoint namespace