I would like to create a custom collection that implements ICollection
.
But I would like not to expose some memebers of ICollection
like Clear
method.
How to achieve this?
I would like to create a custom collection that implements ICollection
.
But I would like not to expose some memebers of ICollection
like Clear
method.
How to achieve this?
If you just want to hide those members from your own collection's interface, you can define them explicitly.
Explicitly defined members are only available if the instance is used through that interface.