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 에 성공하면 이벤트가 발생합니다.

적용 대상