Binding.BindingMemberInfo Property

Definition

Gets an object that contains information about this binding based on the dataMember parameter in the Binding constructor.

C#
public System.Windows.Forms.BindingMemberInfo BindingMemberInfo { get; }

Property Value

A BindingMemberInfo that contains information about this Binding.

Examples

The following code example gets the BindingMemberInfo of each Binding on a form, and prints the BindingPath, BindingField, and BindingMember property values for that Binding.

C#
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);
      }
   }
}

Remarks

The BindingMemberInfo is created from the dataMember string passed to the Binding constructor.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also