Method Remove
Remove(object?)
Removes the first occurrence of a specific object from the ICollection<T>.
public bool Remove(object? item)
Parameters
itemobjectThe object to remove from the ICollection<T>.
Returns
- bool
true if
itemwas successfully removed from the ICollection<T>; otherwise, false. This method also returns false ifitemis not found in the original ICollection<T>.
Exceptions
- NotSupportedException
The ICollection<T> is read-only.