ControlBindingsCollection.Remove(Binding) 메서드

정의

컬렉션에서 지정된 Binding을 삭제합니다.Deletes the specified Binding from the collection.

public:
 void Remove(System::Windows::Forms::Binding ^ binding);
public void Remove (System.Windows.Forms.Binding binding);
override this.Remove : System.Windows.Forms.Binding -> unit
Public Sub Remove (binding As Binding)

매개 변수

binding
Binding

제거할 Binding입니다.The Binding to remove.

예외

bindingnull인 경우The binding is null.

예제

다음 코드 예제에서는 Binding 컨트롤의에서 특정를 제거 합니다 TextBox ControlBindingsCollection .The following code example removes a specific Binding from a TextBox control's ControlBindingsCollection. 이 예제에서는 속성을 사용 하 여 필요한를 가져오고, 메서드를 사용 하 여 Binding Item[] 를 제거 합니다 Binding Remove .The example gets the required Binding by using the Item[] property, and removes the Binding with the Remove method.

void RemoveBackColorBinding()
{
   Binding^ colorBinding = textBox1->DataBindings[ "BackColor" ];
   textBox1->DataBindings->Remove( colorBinding );
}

private void RemoveBackColorBinding()
{
   Binding colorBinding = textBox1.DataBindings["BackColor"];
   textBox1.DataBindings.Remove(colorBinding);
}
Private Sub RemoveBackColorBinding()
    Dim colorBinding As Binding = textBox1.DataBindings("BackColor")
    textBox1.DataBindings.Remove(colorBinding)
End Sub

적용 대상