SPAttachmentCollection.RecycleNow method

Recycles the attachment that is represented by the specified file name without requiring an update to the parent list item.

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

Syntax

'Declaration
Public Sub RecycleNow ( _
    leafName As String _
)
'Usage
Dim instance As SPAttachmentCollection
Dim leafName As String

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

Parameters

Exceptions

Exception Condition
ArgumentOutOfRangeException

leafName does not exist in the collection.

Remarks

If you recycle an attachment by using the RecycleNow method, the action takes effect immediately and you do not need to call the Update method to update the list item and refresh version information.

See also

Reference

SPAttachmentCollection class

SPAttachmentCollection members

Microsoft.SharePoint namespace