Before I even ask, let me get the obvious answer out of the way: The ICollection
interface includes a Remove
method to remove an arbitrary
Ultimately perhaps they are just not ideal fits; if you want a list or collection - use a List
or Collection
;p
Re Add
- there is an implicit assumption that Add
adds to the end of the collection, which is not true of a stack (although it is for a queue). In some ways, it actually confuses me that the enumerator for stack/queue does not dequeue/pop, since I largely expect items in a queue/stack to be fetched once each (and once only).
Maybe also (again, using my enumerator as just an example) people simply couldn't agree on exactly how it should behave in some of those scenarios, and lacking complete agreement, simply not implementing them was a better choice.