다음을 통해 공유


Menu.MenuItemCollection 클래스

MenuItem 개체의 컬렉션을 나타냅니다.

네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms(system.windows.forms.dll)

구문

‘선언
Public Class MenuItemCollection
    Implements IList, ICollection, IEnumerable
‘사용 방법
Dim instance As MenuItemCollection
public class MenuItemCollection : IList, ICollection, IEnumerable
public ref class MenuItemCollection : IList, ICollection, IEnumerable
public class MenuItemCollection implements IList, ICollection, 
    IEnumerable
public class MenuItemCollection implements IList, ICollection, 
    IEnumerable

설명

이 클래스는 MainMenu, ContextMenu 또는 MenuItem에 저장된 MenuItem 개체의 컬렉션을 나타냅니다. MainMenuContextMenu 클래스의 경우, 이 컬렉션은 컨트롤의 전체 메뉴 구조를 나타냅니다. MenuItem 클래스의 경우, 이 컬렉션은 MenuItem에 연결된 하위 메뉴 항목의 목록을 나타냅니다.

AddRemove 메서드를 사용하면 컬렉션에서 개별 메뉴 항목을 추가 및 제거할 수 있습니다. 또한 Clear 메서드를 사용하면 컬렉션의 모든 메뉴 항목을 제거할 수 있습니다.

상속 계층 구조

System.Object
  System.Windows.Forms.Menu.MenuItemCollection

스레드로부터의 안전성

이 형식의 모든 public static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

Menu.MenuItemCollection 멤버
System.Windows.Forms 네임스페이스