다음을 통해 공유


Control.ControlCollection.IndexOf 메서드

컨트롤 컬렉션 내에 있는 지정된 컨트롤의 인덱스를 나타냅니다.

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

구문

‘선언
Public Function IndexOf ( _
    control As Control _
) As Integer
‘사용 방법
Dim instance As ControlCollection
Dim control As Control
Dim returnValue As Integer

returnValue = instance.IndexOf(control)
public int IndexOf (
    Control control
)
public:
int IndexOf (
    Control^ control
)
public int IndexOf (
    Control control
)
public function IndexOf (
    control : Control
) : int

매개 변수

  • control
    컬렉션에서 찾을 Control입니다.

반환 값

Control.ControlCollection 내에 있는 지정된 Control의 위치를 나타내는 인덱스(0부터 시작) 값입니다.

설명

이 컨트롤이 컬렉션에 없으면 IndexOf 메서드가 -1 값을 반환합니다.

플랫폼

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에서 지원

참고 항목

참조

Control.ControlCollection 클래스
Control.ControlCollection 멤버
System.Windows.Forms 네임스페이스