共用方式為


DictionaryExtensions.AddRange<TKey,TValue> 方法

定義

將一個字典內容新增至另一個字典

public static void AddRange<TKey,TValue> (this System.Collections.Generic.IDictionary<TKey,TValue> target, System.Collections.Generic.IDictionary<TKey,TValue> source, bool forceUpdate = true);
static member AddRange : System.Collections.Generic.IDictionary<'Key, 'Value> * System.Collections.Generic.IDictionary<'Key, 'Value> * bool -> unit
<Extension()>
Public Sub AddRange(Of TKey, TValue) (target As IDictionary(Of TKey, TValue), source As IDictionary(Of TKey, TValue), Optional forceUpdate As Boolean = true)

類型參數

TKey

字典自變數索引鍵的類型

TValue

字典自變數值的型別

參數

target
IDictionary<TKey,TValue>

目標字典

source
IDictionary<TKey,TValue>

來源字典

forceUpdate
Boolean

是否需要強制更新值

適用於