語言

KeyValuePair<TKey,TValue>(TKey, TValue) 建構函式

定義

初始化結構的新實例 KeyValuePair<TKey,TValue> ,使用指定的鍵與值。

public:
 KeyValuePair(TKey key, TValue value);
public KeyValuePair(TKey key, TValue value);
new System.Collections.Generic.KeyValuePair<'Key, 'Value> : 'Key * 'Value -> System.Collections.Generic.KeyValuePair<'Key, 'Value>
Public Sub New (key As TKey, value As TValue)

參數

key
TKey

每個鍵值對中定義的物件。

value
TValue

與 key相關的定義。

適用於