Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Collections Namespace / Advisable­Collection(T) Class / Advisable­Collection(T) Methods / Advisable­Collection(T).​Remove Method

AdvisableCollection<T>.Remove Method

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

Namespace:  PostSharp.Patterns.Collections
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.48.0 (5.0.48.0)
Syntax
C#
public bool Remove(
	T item
)

Parameters

item
Type: T
The object to remove from the ICollection<T>.

Return Value

Type: 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>.

Implements

ICollection<T>.Remove(T)
Exceptions
ExceptionCondition
NotSupportedExceptionThe ICollection<T> is read-only.
See Also