ToolStripItemCollection.AddRange 方法

定義

ToolStripItem 控制項加入集合中。Adds ToolStripItem controls to the collection.

多載

AddRange(ToolStripItem[])

ToolStripItem 控制項陣列加入集合中。Adds an array of ToolStripItem controls to the collection.

AddRange(ToolStripItemCollection)

ToolStripItemCollection 加入目前的集合中。Adds a ToolStripItemCollection to the current collection.

AddRange(ToolStripItem[])

ToolStripItem 控制項陣列加入集合中。Adds an array of ToolStripItem controls to the collection.

public:
 void AddRange(cli::array <System::Windows::Forms::ToolStripItem ^> ^ toolStripItems);
public void AddRange (System.Windows.Forms.ToolStripItem[] toolStripItems);
member this.AddRange : System.Windows.Forms.ToolStripItem[] -> unit
Public Sub AddRange (toolStripItems As ToolStripItem())

參數

toolStripItems
ToolStripItem[]

ToolStripItem 控制項的陣列。An array of ToolStripItem controls.

例外狀況

toolStripItems 參數為 nullThe toolStripItems parameter is null.

備註

使用 AddRange 的這個多載,將 ToolStripItem 陣列複製到 ToolStripItemCollectionUse this overload of AddRange to copy a ToolStripItem array to a ToolStripItemCollection. 使用採用 ToolStripItemCollection 參數的 AddRange 多載,將一個 ToolStripItemCollection 合併到另一個。Use the overload of AddRange that takes a ToolStripItemCollection parameter to merge one ToolStripItemCollection with another.

AddRange(ToolStripItemCollection)

ToolStripItemCollection 加入目前的集合中。Adds a ToolStripItemCollection to the current collection.

public:
 void AddRange(System::Windows::Forms::ToolStripItemCollection ^ toolStripItems);
public void AddRange (System.Windows.Forms.ToolStripItemCollection toolStripItems);
member this.AddRange : System.Windows.Forms.ToolStripItemCollection -> unit
Public Sub AddRange (toolStripItems As ToolStripItemCollection)

參數

toolStripItems
ToolStripItemCollection

要加入至目前集合的 ToolStripItemCollectionThe ToolStripItemCollection to be added to the current collection.

例外狀況

toolStripItems 參數為 nullThe toolStripItems parameter is null.

備註

使用 AddRange 的這個多載,將一個 ToolStripItemCollection 合併成另一個。Use this overload of AddRange to merge one ToolStripItemCollection with another. 您通常會將這個方法與 ToolStripOverflow搭配使用,而且您可以輕鬆地使用 AddInsertRemove 方法來修改合併的 ToolStripItemCollectionYou typically use this method with ToolStripOverflow, and you can easily use the Add, Insert, and Remove methods to modify the merged ToolStripItemCollection.

使用採用 ToolStripItem 陣列的 AddRange 多載,將 ToolStripItem 控制項的陣列複製到 ToolStripItemCollectionUse the overload of AddRange that takes a ToolStripItem array to copy an array of ToolStripItem controls to a ToolStripItemCollection.

適用於