Partager via


ArrayList.IsReadOnly Property

Gets a value indicating whether the ArrayList collection is read-only.

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)

Syntax

public virtual bool IsReadOnly { get; }

Property Value

true if the ArrayList collection is read-only; otherwise, false. The default return value is false.

Remarks

You cannot add, remove, or modify any of the objects in a read-only collection after it has been created.

A read-only collection is simply a collection with a wrapper that prevents objects in the collection from being added, removed, or modified. Therefore, if changes are made to the underlying collection, the read-only collection reflects those changes.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

ArrayList Class
ArrayList Members
System.Collections Namespace