Delen via


ViewDataDictionary.Add Method (KeyValuePair<String, Object>)

Adds the specified item to the collection.

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

Syntax

'Declaration
Public Sub Add ( _
    item As KeyValuePair(Of String, Object) _
)
public void Add(
    KeyValuePair<string, Object> item
)
public:
virtual void Add(
    KeyValuePair<String^, Object^> item
) sealed

Parameters

Implements

ICollection<T>.Add(T)

Exceptions

Exception Condition
NotSupportedException

The collection is read-only.

See Also

Reference

ViewDataDictionary Class

Add Overload

System.Web.Mvc Namespace