[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Namespace:
System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll)
Gets a value indicating whether the ICollectionT is read-only.
Assembly: mscorlib (in mscorlib.dll)
Syntax
Private ReadOnly Property IsReadOnly As Boolean
Implements ICollection(Of T).IsReadOnly
Dim instance As List
Dim value As Boolean
value = CType(instance, ICollection(Of T)).IsReadOnly
bool ICollection<T>.IsReadOnly { get; }
private:
virtual property bool IsReadOnly {
bool get () sealed = ICollection<T>::IsReadOnly::get;
}
JScript does not support explicit interface implementations.
Property Value
Type: SystemBooleantrue if the ICollectionT is read-only; otherwise, false. In the default implementation of ListT, this property always returns false.
Implements
ICollectionTIsReadOnly
Remarks
A collection that is read-only does not allow the addition, removal, or modification of elements after the collection is created.
A collection that is read-only is simply a collection with a wrapper that prevents modifying the collection; therefore, if changes are made to the underlying collection, the read-only collection reflects those changes.
Retrieving the value of this property is an O(1) operation.