CollectionExtensions.Remove<TKey,TValue> Yöntem

Tanım

belirtilen key değerinden kaldırmaya dictionaryçalışır.

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

Tür Parametreleri

TKey

içindeki anahtarların dictionarytürü.

TValue

içindeki değerlerin dictionarytürü.

Parametreler

dictionary
IDictionary<TKey,TValue>

türünde anahtarlara ve türüne TKey sahip değerlere sahip bir TValuesözlük.

key
TKey

Kaldırılacak değerin anahtarı.

value
TValue

Bu yöntem döndürdüğündetrue, kaldırılan değer; bu yöntem döndürdüğünde falsedefaultdeğerini döndürürTValue.

Döndürülenler

trueiçinde belirtilen ile bir değer bulunduğunda dictionary ; key belirtilen ile ilişkilendirilmiş bir değer bulunamadığındafalsedictionary.key

Özel durumlar

dictionary, null'e eşittir.

Şunlara uygulanır