c# - Best practice to create typed collections/lists with internal or private Add, Remove functionality? -
I often apply type archives and lists. Often in the old versions of the collections and comprehensions I am not happy with the ways of adding and removing the public. Net has implemented the IMEMERABLE but this is a lot of work.
What are the better options?
I have seen a similar question, but not particularly
thanks.
Does it have to be sown?
Edit
Since you want ...
... internally in the collection / list To add or internally individually
You can have a private IList and
you add items, and ReadOnlyCollection & Lt; T & gt;
There is a cover around this list. Since this is a cover, all the changes in the underlying list will be visible in this read-only collection.
Comments
Post a Comment