ReadOnlyDictionary<TKey,TValue>(IDictionary<TKey,TValue>) 建構函式

定義

初始化 ReadOnlyDictionary<TKey,TValue> 類別的新執行個體,這個執行個體是指定之字典的包裝函式。

public:
 ReadOnlyDictionary(System::Collections::Generic::IDictionary<TKey, TValue> ^ dictionary);
public ReadOnlyDictionary (System.Collections.Generic.IDictionary<TKey,TValue> dictionary);
new System.Collections.ObjectModel.ReadOnlyDictionary<'Key, 'Value> : System.Collections.Generic.IDictionary<'Key, 'Value> -> System.Collections.ObjectModel.ReadOnlyDictionary<'Key, 'Value>
Public Sub New (dictionary As IDictionary(Of TKey, TValue))

參數

dictionary
IDictionary<TKey,TValue>

要包裝的字典。

例外狀況

dictionarynull

適用於