다음을 통해 공유


Binding.BindingMemberInfo 속성

정의

Binding 생성자의 dataMember 매개 변수를 기반으로 이 바인딩에 대한 정보가 포함된 개체를 가져옵니다.

public:
 property System::Windows::Forms::BindingMemberInfo BindingMemberInfo { System::Windows::Forms::BindingMemberInfo get(); };
public System.Windows.Forms.BindingMemberInfo BindingMemberInfo { get; }
member this.BindingMemberInfo : System.Windows.Forms.BindingMemberInfo
Public ReadOnly Property BindingMemberInfo As BindingMemberInfo

속성 값

BindingMemberInfo에 대한 정보가 포함된 Binding입니다.

예제

다음 코드 예제에서는 폼에서 각 Binding 의 를 가져오 BindingMemberInfo 고 해당 에 대한 Binding, BindingFieldBindingMember 속성 값을 인쇄BindingPath합니다.

private:
   void PrintBindingMemberInfo()
   {
      for each ( Control^ thisControl in this->Controls)
      {
         for each ( Binding^ thisBinding in thisControl->DataBindings)
         {
            // Print the control's name and Binding information.
            Console::WriteLine( "\n {0}", thisControl );
            BindingMemberInfo bInfo = thisBinding->BindingMemberInfo;
            Console::WriteLine( "Binding Path \t {0}", bInfo.BindingPath );
            Console::WriteLine( "Binding Field \t {0}", bInfo.BindingField );
            Console::WriteLine( "Binding Member \t {0}", bInfo.BindingMember );
         }
      }
   }
private void PrintBindingMemberInfo()
{
   foreach(Control thisControl in this.Controls)
   {
      foreach(Binding thisBinding in thisControl.DataBindings)
      {
         // Print the control's name and Binding information.
         Console.WriteLine("\n" + thisControl.ToString());
         BindingMemberInfo bInfo = thisBinding.BindingMemberInfo;
         Console.WriteLine("Binding Path \t" + bInfo.BindingPath);
         Console.WriteLine("Binding Field \t" + bInfo.BindingField);
         Console.WriteLine("Binding Member \t" + bInfo.BindingMember);
      }
   }
}
Private Sub PrintBindingMemberInfo()
    Dim thisControl As Control
    For Each thisControl In  Me.Controls
        Dim thisBinding As Binding
        For Each thisBinding In  thisControl.DataBindings
            ' Print the control's name and Binding information.
            Console.WriteLine(ControlChars.Cr + thisControl.ToString())
            Dim bInfo As BindingMemberInfo = thisBinding.BindingMemberInfo
            Console.WriteLine("Binding Path " + ControlChars.Tab _
                             + bInfo.BindingPath)
            Console.WriteLine("Binding Field " + ControlChars.Tab _
                             + bInfo.BindingField)
            Console.WriteLine("Binding Member " + ControlChars.Tab _
                             + bInfo.BindingMember)
        Next thisBinding
    Next thisControl
End Sub

설명

BindingMemberInfo 생성자에 전달된 Binding 문자열에서 dataMember 만들어집니다.

적용 대상

추가 정보