Export (0) Print
Expand All

Array.IsReadOnly Property

Gets a value indicating whether the Array is read-only.

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

abstract IsReadOnly : bool with get 
override IsReadOnly : bool with get

Property Value

Type: System.Boolean
This property is always false for all arrays.

Implements

IList.IsReadOnly

Array implements the IsReadOnly property because it is required by the System.Collections.IList interface. An array that is read-only does not allow the addition, removal, or modification of elements after the array is created.

If you require a read-only collection, use a System.Collections class that implements the System.Collections.IList interface.

If you cast or convert an array to an IList interface object, the IList.IsReadOnly property returns false. However, if you cast or convert an array to a IList(T) interface, the IsReadOnly property returns true.

Retrieving the value of this property is an O(1) operation.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft