共用方式為


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> 物件的物件。

實作

例外狀況

適用於

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>

適用於