SPAttachmentCollection members

Represents the collection of attachments for a list item.

The SPAttachmentCollection type exposes the following members.

Properties

  Name Description
Public property Count Gets the number of attachments in the collection.
Public property IsSynchronized Gets a Boolean value that indicates whether access to the collection is synchronized or thread safe.
Public property Item Gets the file name of the attachment at the specified index in the collection. [C#] In C#, this property is the indexer for the SPAttachmentCollection class.
Public property SyncRoot Gets an object that is used to synchronize access to the collection.
Public property UrlPrefix Gets the URL for the directory that contains the collection.

Top

Methods

  Name Description
Public method Add Adds the attachment that is represented by the specified file name and byte array to the list item.
Public method AddNow Adds the attachment that is represented by the specified file name and byte array to the list item without requiring an update to the parent list item.
Public method Delete Deletes the attachment with the specified file name from the collection.
Public method DeleteNow Deletes the attachment with the specified file name from the collection without requiring an update to the parent list item.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetEnumerator Returns an enumerator to iterate through the collection.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Recycle Recycles the attachment that is represented by the specified file name.
Public method RecycleNow Recycles the attachment that is represented by the specified file name without requiring an update to the parent list item.
Public method ToString (Inherited from Object.)

Top

Explicit interface implementations

  Name Description
Explicit interface implemetationPrivate method ICollection.CopyTo Copies the elements of the attachment collection to a one-dimensional array, starting at the specified index.

Top

See also

Reference

SPAttachmentCollection class

Microsoft.SharePoint namespace