IsReadOnly Property
Collapse the table of content
Expand the table of content

ICollection<T>.IsReadOnly Property


Gets a value indicating whether the ICollection<T> is read-only.

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

bool IsReadOnly { get; }

Property Value

Type: System.Boolean

true if the ICollection<T> is read-only; otherwise, false.

A collection that is read-only does not allow the addition or removal of elements after the collection is created. Note that read-only in this context does not indicate whether individual elements of the collection can be modified, since the ICollection<T> interface only supports addition and removal operations. For example, the IsReadOnly property of an array that is cast or converted to an ICollection<T> object returns true, even though individual array elements can be modified.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2015 Microsoft