Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ViewDataDictionary.ContainsKey Method (String)

 

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)

public bool ContainsKey(
	string key
)

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.

Exception Condition
ArgumentNullException

key is null.

Return to top
Show:
© 2015 Microsoft