Export (0) Print
Expand All

ViewDataDictionary.ContainsKey Method

Determines whether the collection contains an element that has the specified key.

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

abstract ContainsKey : 
        key:string -> bool  
override ContainsKey : 
        key:string -> bool

Parameters

key
Type: System.String

The key of the element to locate in the collection.

Return Value

Type: System.Boolean
true if the collection contains an element that has the specified key; otherwise, false.

Implements

IDictionary(TKey, TValue).ContainsKey(TKey)

ExceptionCondition
ArgumentNullException

key is a null reference (Nothing in Visual Basic).

Show:
© 2014 Microsoft