AttachmentCollection class

Represents the collection of attachments for a list item.

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Client.ClientObject
    Microsoft.SharePoint.Client.ClientObjectCollection
      Microsoft.SharePoint.Client.ClientObjectCollection<Attachment>
        Microsoft.SharePoint.Client.AttachmentCollection

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

Syntax

'Declaration
Public NotInheritable Class AttachmentCollection _
    Inherits ClientObjectCollection(Of Attachment)
'Usage
Dim instance As AttachmentCollection
public sealed class AttachmentCollection : ClientObjectCollection<Attachment>

Remarks

Use the AttachmentFiles property of the ListItem class to return the collection of attachments for a list item. To create an attachment, use the Add method

Use an indexer to return the file name of a single attachment from the collection. For example, assuming the collection is assigned to a variable named collAttachments , use collAttachments[index] in C#, or collAttachments(index) in Visual Basic, where index is the index number of the attachment in the collection.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also

Reference

AttachmentCollection members

Microsoft.SharePoint.Client namespace