共用方式為


SPAttachmentCollection.DeleteNow method

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

Syntax

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

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

參數

  • leafName
    Type: System.String

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

Exceptions

Exception Condition
ArgumentOutOfRangeException

leafName不存在於集合中。

備註

如果您可以使用DeleteNow方法,以刪除附件,刪除會立即生效,您不需要更新的清單項目,以重新整理版本資訊。與AddNow方法的行為,不同的是刪除會立即生效目前的附件集合物件中。

請參閱

參照

SPAttachmentCollection class

SPAttachmentCollection members

Microsoft.SharePoint namespace