Click or drag to resize
AlgorithmsReadOnlyT Method (ICollectionT)
Returns a read-only view onto a collection. The returned ICollection<T> interface only allows operations that do not change the collection: GetEnumerator, Contains, CopyTo, Count. The ReadOnly property returns false, indicating that the collection is read-only. All other methods on the interface throw a NotSupportedException.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public static ICollection<T> ReadOnly<T>(
	ICollection<T> collection
)

Parameters

collection
Type: System.Collections.GenericICollectionT
The collection to wrap.

Type Parameters

T
The type of items in the collection.

Return Value

Type: ICollectionT
A read-only view onto collection. If collection is null, then null is returned.
Remarks
The data in the underlying collection is not copied. If the underlying collection is changed, then the read-only view also changes accordingly.
See Also