P
phillipwei
What's the best way to achieve this, or is this a bad idea?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.


Laura T. said:Supported yes, but also correctly implemented to be really
readonlycollection, for example:
void IList<T>.Insert(int index, T value) {
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);
}
void ICollection<T>.Add(T value) {
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);
}
So it really remains "immutable".
Joanna Carter said:"Peter Bromberg [C# MVP]" <[email protected]> a écrit dans
le message de news: (e-mail address removed)...
| By Jove! Now that there is truly immutable!
...until you cast it to IList, IList<T>, ICollection or ICollection<T>,
all
of which are supported by the class.
Joanna

There is a reason. I had that problem years ago. I was supposed toJoanna Carter said:"Peter Bromberg [C# MVP]" <[email protected]> a écrit dans
le message de news: (e-mail address removed)...
| Did their homework after all.
| Nice.
| Peter
| "Laura T." wrote:
|
| > Supported yes, but also correctly implemented to be really
| > readonlycollection, for example:
| >| > So it really remains "immutable".
Shucks! you saw through my little ploy
Joanna
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.