CollectionExtensions.Remove<TKey,TValue> メソッド

定義

指定した key を持つ値を dictionaryから削除しようとします。

public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
 static bool Remove(System::Collections::Generic::IDictionary<TKey, TValue> ^ dictionary, TKey key, [Runtime::InteropServices::Out] TValue % value);
public static bool Remove<TKey,TValue>(this System.Collections.Generic.IDictionary<TKey,TValue> dictionary, TKey key, out TValue value);
static member Remove : System.Collections.Generic.IDictionary<'Key, 'Value> * 'Key * 'Value -> bool
<Extension()>
Public Function Remove(Of TKey, TValue) (dictionary As IDictionary(Of TKey, TValue), key As TKey, ByRef value As TValue) As Boolean

型パラメーター

TKey

dictionary内のキーの種類。

TValue

dictionary内の値の型。

パラメーター

dictionary
IDictionary<TKey,TValue>

TKey型のキーとTValue型の値を持つディクショナリ。

key
TKey

削除する値のキー。

value
TValue

このメソッドがtrueを返すとき、削除された値。このメソッドがfalseを返すときは、TValuedefault値。

返品

true指定したkeyを持つdictionaryで値が見つかった場合はfalse。指定したkeyに関連付けられている値がdictionaryで見つからない場合に。

例外

dictionarynullです。

適用対象