I would like to create a custom collection that implements ICollection
.
But I would like not to expose some memebers of ICollection
like
What makes you so sure that you really need to implement ICollection
? If you don't want some methods from this interface, don't use it, declare a new interface with methods that you want. The whole point of using ICollection
is to make other objects think that they can do with your object whatever they can do with any other collection.