Returns a read-only ArrayList wrapper.
- list
- The ArrayList to wrap.
A read-only ArrayList wrapper around list.
Type Reason ArgumentNullException list is null.
This method returns a read-only ArrayList that contains a reference to list. Operations that attempt add to, delete from, or modify the elements of this new list will throw NotSupportedException. Any modifications of the elements list will be reflected in the new list.
Note:The ArrayList.IsReadOnly and ArrayList.IsFixedSize properties of the new list are true. Every other property value of the new list references the same property value of list.
By performing operations on the new list, this wrapper can be used to prevent additions to, deletions from, and modifications of the ArrayListlist.
Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0