共用方式為


CommandCollection.AddRange(ICollection) 方法

定義

將指定項目集新增至集合結尾。

public void AddRange (System.Collections.ICollection items);
member this.AddRange : System.Collections.ICollection -> unit
Public Sub AddRange (items As ICollection)

參數

items
ICollection

ICollection,其項目應新增至集合。

例外狀況

  • 指定的集合是 Null 參考, (Visual Basic 中的 Nothing) 。
  • 指定的集合有一或多個專案,這些專案在 Visual Basic 中為 Null 參考 (Nothing) 。
  • 指定的集合具有重複的專案。
  • 指定的集合有一或多個已在集合中擷取的專案。
  • 指定的集合有一或多個代表不相容命令的專案。

適用於