xtd 0.2.0
Loading...
Searching...
No Matches

◆ is_read_only()

template<typename type_t >
virtual bool xtd::collections::generic::icollection< type_t >::is_read_only ( ) const
pure virtualnoexcept

Gets a value indicating whether the xtd::collections::generic::icollection <type_t> is read-only.

Returns
true if the xtd::collections::generic::icollection <type_t> is read-only; otherwise, false.
Remarks
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 xtd::collections::generic::icollection <type_t> interface only supports addition and removal operations. For example, the IsReadOnly property of an array that is cast or converted to an xtd::collections::generic::icollection <type_t> object returns true, even though individual array elements can be modified.

Implemented in xtd::basic_array< type_t, allocator_t >, xtd::basic_array< type_t, allocator_t >, and xtd::collections::generic::list< type_t, allocator_t >.