CollectionExtensions.Remove<TKey,TValue> メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した 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を返すときは、TValueのdefault値。
返品
true指定したkeyを持つdictionaryで値が見つかった場合はfalse。指定したkeyに関連付けられている値がdictionaryで見つからない場合に。
例外
dictionary は nullです。