Control.ControlCollection.IndexOf(Control) 메서드

정의

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

public:
 int IndexOf(System::Windows::Forms::Control ^ control);
public int IndexOf (System.Windows.Forms.Control control);
public int IndexOf (System.Windows.Forms.Control? control);
member this.IndexOf : System.Windows.Forms.Control -> int
Public Function IndexOf (control As Control) As Integer

매개 변수

control
Control

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

반환

Int32

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

설명

컬렉션 IndexOf 에서 컨트롤을 찾을 수 없는 경우 메서드 반환 값은 -1입니다.

적용 대상