ValueProviderDictionary.Add 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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))
參數
要加入 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> 。