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

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -