Menu.MenuItemCollection Class
Represents a collection of MenuItem objects.
For a list of all members of this type, see Menu.MenuItemCollection Members.
System.Object
System.Windows.Forms.Menu.MenuItemCollection
[Visual Basic] Public Class Menu.MenuItemCollection Implements IList, ICollection, IEnumerable [C#] public class Menu.MenuItemCollection : IList, ICollection, IEnumerable [C++] public __gc class Menu.MenuItemCollection : public IList, ICollection, IEnumerable [JScript] public class Menu.MenuItemCollection implements IList, ICollection, IEnumerable
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Remarks
This class represents the collection of MenuItem objects stored in a MainMenu, ContextMenu, or MenuItem. For the MainMenu and ContextMenu classes, this collection represents the entire menu structure for the control. For the MenuItem class, this collection represents the list of submenu items associated with the MenuItem.
The Add and Remove methods enable you to add and remove individual menu items from the collection. You can also use the Clear method to remove all the menu items from the collection.
Requirements
Namespace: System.Windows.Forms
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
See Also
Menu.MenuItemCollection Members | System.Windows.Forms Namespace