|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
readonly access to generic collections.Is there a way to have a read - only generic List, Dictionar etc in .NET
Framework 2.0 (something like the ArrayList.Readonly() method), or do I have to make a wrapper myself? Try
List<T>.AsReadOnly() Best regards, Robin Theilade Show quote "Strider" <Stri***@discussions.microsoft.com> wrote in message news:FAF251C7-EA3E-4A1E-AADD-831FD040D998@microsoft.com... > Is there a way to have a read - only generic List, Dictionar etc in .NET > Framework 2.0 (something like the ArrayList.Readonly() method), or do I > have > to make a wrapper myself? Thanks Robin, this is just what I was looking for!
Show quote "Robin Theilade" wrote: > Try > > List<T>.AsReadOnly() > > Best regards, > Robin Theilade > > "Strider" <Stri***@discussions.microsoft.com> wrote in message > news:FAF251C7-EA3E-4A1E-AADD-831FD040D998@microsoft.com... > > Is there a way to have a read - only generic List, Dictionar etc in .NET > > Framework 2.0 (something like the ArrayList.Readonly() method), or do I > > have > > to make a wrapper myself? > > > |
|||||||||||||||||||||||