Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ICollection(KeyValuePair(TKey, TValue)).Contains Method

ReadOnlyDictionary<TKey, TValue>.ICollection<KeyValuePair<TKey, TValue>>.Contains Method

.NET Framework 4.6 and 4.5

Determines whether the dictionary contains a specific value.

Namespace:  System.Collections.ObjectModel
Assemblies:   System.ObjectModel (in System.ObjectModel.dll)
  mscorlib (in mscorlib.dll)

bool ICollection<KeyValuePair<TKey, TValue>>.Contains(
	KeyValuePair<TKey, TValue> item
)

Parameters

item
Type: System.Collections.Generic.KeyValuePair<TKey, TValue>

The object to locate in the dictionary.

Return Value

Type: System.Boolean
true if item is found in the dictionary; otherwise, false.

Implements

ICollection<T>.Contains(T)

This member is an explicit interface member implementation. It can be used only when the ReadOnlyDictionary<TKey, TValue> instance is cast to an ICollection<T> interface.

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8
Show:
© 2015 Microsoft