CollectionExtensions.Remove<TKey,TValue> 메서드

정의

dictionary에서 지정된 key을(를) 사용하여 값 제거하려고 시도합니다.

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 값입니다.

반환

값을 지정된 key이(가) 있는 dictionary에서 찾은 경우 true이고, dictionary에서 지정된 key과(와) 연결된 값을 찾을 수 없는 경우 false입니다.

예외

dictionary이(가) null인 경우

적용 대상