Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

ReadOnlyCollectionBase<(Of <(<'T>)>)> Class

ReadOnlyCollectionBase is a base class that can be used to more easily implement the generic ICollection<T> and non-generic ICollection interfaces for a read-only collection: a collection that does not allow adding or removing elements.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


[SerializableAttribute]
[DebuggerDisplayAttribute]
public abstract class ReadOnlyCollectionBase<T> : ICollection<T>, 
	ICollection
<SerializableAttribute> _
<DebuggerDisplayAttribute> _
Public MustInherit Class ReadOnlyCollectionBase(Of T) _
	Implements ICollection(Of T), ICollection
[SerializableAttribute]
[DebuggerDisplayAttribute]
generic<typename T>
public ref class ReadOnlyCollectionBase abstract : ICollection<T>, 
	ICollection

Type Parameters

T
The item type of the collection.

Remarks


To use ReadOnlyCollectionBase as a base class, the derived class must override the Count and GetEnumerator methods.

ICollection<T>.Contains need not be implemented by the derived class, but it should be strongly considered, because the ReadOnlyCollectionBase implementation may not be very efficient.

Inheritance Hierarchy


Object
  Wintellect.PowerCollections..::..ReadOnlyCollectionBase<(Of <(<'T>)>)>