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

定義

使用指定的索引鍵和值,初始化 KeyValuePair<TKey,TValue> 結構的新執行個體。Initializes a new instance of the KeyValuePair<TKey,TValue> structure with the specified key and value.

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

在每個索引鍵/值組配對中定義的物件。The object defined in each key/value pair.

value
TValue

key 關聯的定義。The definition associated with key.

適用於