Attachments Property
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

SPListItem.Attachments Property

Windows SharePoint Services 3

Gets the collection of attachments that are associated with the item.

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

public SPAttachmentCollection Attachments { get; }

Property Value

Type: Microsoft.SharePoint.SPAttachmentCollection
An SPAttachmentCollection object that represents the attachments.

The Attachments property does not apply to document libraries and returns an ArgumentOutOfRangeException exception if applied to a document library.

© 2015 Microsoft