PostSharpAPI ReferencePost­Sharp.​Patterns.​CollectionsAdvisable­Collection<T>Remove
Open sandboxFocus

Method Remove

Remove(T)

Removes the first occurrence of a specific object from the ICollection<T>.

Declaration
public bool Remove(T item)
Parameters
Type Name Description
T item

The object to remove from the ICollection<T>.

Returns
Type Description
Boolean

true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>.

Exceptions
Type Condition
NotSupportedException

The ICollection<T> is read-only.