Simple Mail and Post Office Protocol for .Net (SmtPop)

MimeAttachmentList.BinarySearch Method 

Searches the entire sorted MimeAttachmentList for an MimeAttachment element using the default comparer and returns the zero-based index of the element.

public virtual int BinarySearch(
   MimeAttachment value
);

Parameters

value
The MimeAttachment object to locate in the MimeAttachmentList. This argument can be a null reference.

Return Value

The zero-based index of value in the sorted MimeAttachmentList, if value is found; otherwise, a negative number, which is the bitwise complement of the index of the next element that is larger than value or, if there is no larger element, the bitwise complement of Count.

Remarks

Please refer to BinarySearch for details.

Exceptions

Exception Type Condition
InvalidOperationException Neither value nor the elements of the MimeAttachmentList implement the IComparable interface.

See Also

MimeAttachmentList Class | SmtPop Namespace