다음을 통해 공유


ControlBindingsCollection.RemoveAt(Int32) 메서드

정의

지정된 인덱스에서 삭제합니다 Binding .

public:
 void RemoveAt(int index);
public void RemoveAt(int index);
override this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

매개 변수

index
Int32

제거할 항목의 인덱스(0부터 시작하는 인덱스)입니다.

예외

값이 index 0보다 작거나 컬렉션의 바인딩 수보다 큽니다.

예제

다음 코드 예제에서는 인덱스가 Count 컬렉션의 범위 내에 있는지 여부를 확인 하려면 속성을 사용 합니다. 그렇다면 세 번째 Binding 가 제거됩니다.

private:
   void RemoveThirdBinding()
   {
      if ( textBox1->DataBindings->Count < 3 )
      {
         return;
      }
      textBox1->DataBindings->RemoveAt( 2 );
   }
private void RemoveThirdBinding()
{
   if(textBox1.DataBindings.Count < 3) return;
   textBox1.DataBindings.RemoveAt(2);
}
Private Sub RemoveThirdBinding()
    If textBox1.DataBindings.Count < 3 Then
        Return
    End If
    textBox1.DataBindings.RemoveAt(2)
End Sub

설명

제거 CollectionChanged 에 성공하면 이벤트가 발생합니다.

적용 대상