Click or drag to resize
ReadOnlyDictionaryTKey, TValue Constructor
初始化只读字典类的新实例,该实例包装了一个普通的字典实例。

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public ReadOnlyDictionary(
	IDictionary<TKey, TValue> innerDictionary
)

Parameters

innerDictionary
Type: System.Collections.GenericIDictionaryTKey, TValue
要包装的普通字典实例。
Exceptions
ExceptionCondition
ArgumentNullException[P:innerDictionary]为null。
Remarks

只读字典不会从包装的普通字典中复制元素,而是直接暴露普通字典中具有只读特征的成员。 具有只写特征的成员将被隐藏,如果强制调用,则会抛出NotSupportedException异常。

See Also