KeyValuePair.Create<TKey,TValue>(TKey, TValue) 方法

定義

使用提供的值,建立新的索引鍵/值組執行個體。

public:
generic <typename TKey, typename TValue>
 static System::Collections::Generic::KeyValuePair<TKey, TValue> Create(TKey key, TValue value);
public static System.Collections.Generic.KeyValuePair<TKey,TValue> Create<TKey,TValue> (TKey key, TValue value);
static member Create : 'Key * 'Value -> System.Collections.Generic.KeyValuePair<'Key, 'Value>
Public Shared Function Create(Of TKey, TValue) (key As TKey, value As TValue) As KeyValuePair(Of TKey, TValue)

類型參數

TKey

索引鍵的類型。

TValue

值的類型。

參數

key
TKey

要建立的新 KeyValuePair<TKey,TValue> 索引鍵。

value
TValue

要建立的新 KeyValuePair<TKey,TValue> 值。

傳回

包含以提供的引數做為值的索引鍵/值組。

適用於