ValueProviderDictionary.Add 方法

定义

重载

Add(KeyValuePair<String,ValueProviderResult>)

将指定的项添加到值提供程序的集合。

Add(String, Object)

将具有指定的键和值的元素添加到值提供程序的集合中。

Add(String, ValueProviderResult)

将具有指定的键和值的元素添加到值提供程序的集合中。

Add(KeyValuePair<String,ValueProviderResult>)

将指定的项添加到值提供程序的集合。

public void Add (System.Collections.Generic.KeyValuePair<string,System.Web.Mvc.ValueProviderResult> item);
abstract member Add : System.Collections.Generic.KeyValuePair<string, System.Web.Mvc.ValueProviderResult> -> unit
override this.Add : System.Collections.Generic.KeyValuePair<string, System.Web.Mvc.ValueProviderResult> -> unit
Public Sub Add (item As KeyValuePair(Of String, ValueProviderResult))

参数

item
KeyValuePair<String,ValueProviderResult>

要添加到 ICollection<T> 对象中的对象。

实现

例外

ICollection<T> 对象是只读的。

适用于

Add(String, Object)

将具有指定的键和值的元素添加到值提供程序的集合中。

public void Add (string key, object value);
member this.Add : string * obj -> unit
Public Sub Add (key As String, value As Object)

参数

key
String

要添加的元素的键。

value
Object

要添加的元素的值。

例外

key 为 null。

对象中已存在具有指定键的 IDictionary<TKey,TValue> 元素。

适用于

Add(String, ValueProviderResult)

将具有指定的键和值的元素添加到值提供程序的集合中。

public void Add (string key, System.Web.Mvc.ValueProviderResult value);
abstract member Add : string * System.Web.Mvc.ValueProviderResult -> unit
override this.Add : string * System.Web.Mvc.ValueProviderResult -> unit
Public Sub Add (key As String, value As ValueProviderResult)

参数

key
String

要添加的元素的键。

value
ValueProviderResult

要添加的元素的值。

实现

例外

key 为 null。

对象中已存在具有指定键的 IDictionary<TKey,TValue> 元素。

适用于