TempDataDictionary.ICollection(Of KeyValuePair(Of String, Object)).Contains Method

Determines whether a sequence contains a specified element by using the default equality comparer.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

'Declaration
Private Function Contains ( _
	keyValuePair As KeyValuePair(Of String, Object) _
) As Boolean Implements ICollection(Of KeyValuePair(Of String, Object)).Contains
'Usage
Dim instance As TempDataDictionary 
Dim keyValuePair As KeyValuePair(Of String, Object)
Dim returnValue As Boolean 

returnValue = CType(instance, ICollection(Of KeyValuePair(Of String, Object))).Contains(keyValuePair)

Parameters

keyValuePair
Type: System.Collections.Generic.KeyValuePair(Of String, Object)

The key/value pair to search for.

Return Value

Type: System.Boolean
true if the dictionary contains the specified key/value pair; otherwise, false.

Implements

ICollection(Of T).Contains(T)

This member is an explicit interface member implementation. It can be used only when the TempDataDictionary instance is cast to an ICollection(Of T) interface.

Show: