Click or drag to resize
AlgorithmsReadOnlyT Method (IListT)
Returns a read-only view onto a list. The returned IList<T> interface only allows operations that do not change the list: GetEnumerator, Contains, CopyTo, Count, IndexOf, and the get accessor of the indexer. The IsReadOnly property returns true, indicating that the list 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 IList<T> ReadOnly<T>(
	IList<T> list
)

Parameters

list
Type: System.Collections.GenericIListT
The list to wrap.

Type Parameters

T
The type of items in the list.

Return Value

Type: IListT
A read-only view onto list. Returns null if list is null. If list is already read-only, returns list.
Remarks
The data in the underlying list is not copied. If the underlying list is changed, then the read-only view also changes accordingly.
See Also