Add Method

TempDataDictionary.Add Method (String, Object)

 

Adds an element that has the specified key and value to the IDictionary<'TKey, 'TValue> object.

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

abstract Add : 
        key:string *
        value:Object -> unit
override Add : 
        key:string *
        value:Object -> unit

Parameters

key
Type: System.String

The key of the element to add.

value
Type: System.Object

The value of the element to add.

Exception Condition
NotSupportedException

The IDictionary<'TKey, 'TValue> object is read-only.

ArgumentNullException

key is null.

ArgumentException

An element that has the same key already exists in the IDictionary<'TKey, 'TValue> object.

Return to top
Show:
© 2016 Microsoft