System.Windows.Forms.ToolStripItemCollection.AddRange C# (CSharp) Méthode

AddRange() public méthode

public AddRange ( ToolStripItem toolStripItems ) : void
toolStripItems ToolStripItem
Résultat void
		public void AddRange (ToolStripItem[] toolStripItems)
		{
			if (toolStripItems == null)
				throw new ArgumentNullException ("toolStripItems");
			if (this.IsReadOnly)
				throw new NotSupportedException ("This collection is read-only");

			this.owner.SuspendLayout ();

			foreach (ToolStripItem tsi in toolStripItems)
				this.Add (tsi);

			this.owner.ResumeLayout ();
		}

Same methods

ToolStripItemCollection::AddRange ( ToolStripItemCollection toolStripItems ) : void

Usage Example

Exemple #1
0
        public void GetPluginMenuItems(System.Windows.Forms.ToolStripItemCollection menu)
        {
            ICollection <System.Windows.Forms.ToolStripItem> _items = new List <System.Windows.Forms.ToolStripItem>();

            Server.GetPluginMenuItems(_items);
            menu.AddRange(_items.ToArray <ToolStripItem>());
        }
All Usage Examples Of System.Windows.Forms.ToolStripItemCollection::AddRange