Click or drag to resize
AlgorithmsReadOnlyTKey, TValue Method (IDictionaryTKey, TValue)
Returns a read-only view onto a dictionary. The returned IDictionary<TKey,TValue> interface only allows operations that do not change the dictionary. The IsReadOnly property returns true, indicating that the dictionary 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 IDictionary<TKey, TValue> ReadOnly<TKey, TValue>(
	IDictionary<TKey, TValue> dictionary
)

Parameters

dictionary
Type: System.Collections.GenericIDictionaryTKey, TValue
The dictionary to wrap.

Type Parameters

TKey

[Missing <typeparam name="TKey"/> documentation for "M:X3Platform.Collections.Algorithms.ReadOnly``2(System.Collections.Generic.IDictionary{``0,``1})"]

TValue

[Missing <typeparam name="TValue"/> documentation for "M:X3Platform.Collections.Algorithms.ReadOnly``2(System.Collections.Generic.IDictionary{``0,``1})"]

Return Value

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