PostSharp SDK6.7//Post­Sharp.​Sdk.​Code­Model.​Collections Namespace/Element­Collection(T) Class/Element­Collection(T) Methods/Element­Collection(T).​Remove Method

ElementCollection<T>.Remove Method

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

Namespace:  PostSharp.Sdk.CodeModel.Collections
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.7.10.0 (6.7.10.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