Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Menu.MenuItemCollection Constructor

Menu.MenuItemCollection Constructor

Initializes a new instance of the Menu.MenuItemCollection class.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public MenuItemCollection(
	Menu owner


Type: System.Windows.Forms.Menu

The Menu that owns this collection.

This class requires that you associate the collection with a class that derives from Menu, such as the MainMenu, ContextMenu, or MenuItem class. Since you must specify a menu that is associated with this collection, you cannot create multiple menu item collections and associate them with a menu as needed. In order to switch the menu items associated with a menu, you must clear the collection of items and add the menu items to display to the collection.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft