ReadOnlyCollection still editable?
-
So I found that an internal list we wrapped with a public ReadOnlyCollection's members are still editable outside the class, through the ReadOnlyCollection. Maybe I am missing the point, is it simply the ReadOnlyCollection itself that is uneditable and not necessarily the members of the ReadOnlyCollection? What would be the point if this is true? Thanks for your help, David Troyer
-
So I found that an internal list we wrapped with a public ReadOnlyCollection's members are still editable outside the class, through the ReadOnlyCollection. Maybe I am missing the point, is it simply the ReadOnlyCollection itself that is uneditable and not necessarily the members of the ReadOnlyCollection? What would be the point if this is true? Thanks for your help, David Troyer
can u pls elaborate your question with some code snippets?