Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Sealed class: RT.Util.Collections.ReadOnlyCollection<T>

Summary

Wraps an ICollection<T> to allow reading values but prevent setting/removing them.

Generic type parameters

TThis type parameter is not documented.

Constructors

ReadOnlyCollection<T>(ICollection<T> coll)
Creates a new read-only wrapper for the specified ICollection<T>.

Instance methods

void
Add(T item)
  • Implements: ICollection<T>.Add(T)
Not supported on a ReadOnlyCollection.
void
  • Implements: ICollection<T>.Clear()
bool
Contains(T item)
  • Implements: ICollection<T>.Contains(T)
Returns true if the specified item exists in this collection, false otherwise.
void
CopyTo(T[] array, int arrayIndex)
  • Implements: ICollection<T>.CopyTo(T[], int)
Copies the values stored in this collection into the specified dictionary.
IEnumerator<T>
  • Implements: IEnumerable<T>.GetEnumerator()
Gets an enumerator for the values stored in this collection.
bool
IsWrapperFor(ICollection<T> coll)
Returns true if coll is the same collection object as the one this class wraps.
bool
Remove(T item)
  • Implements: ICollection<T>.Remove(T)
Not supported on a ReadOnlyCollection.

Instance properties

int
  • Implements: ICollection<T>.Count
Gets the number of values stored in this collection.
bool
  • Implements: ICollection<T>.IsReadOnly
Returns true, as this is a read-only collection.