BindingMemberInfo Structure
TOC
Collapse the table of content
Expand the table of content

BindingMemberInfo Structure

 

Contains information that enables a Binding to resolve a data binding to either the property of an object or the property of the current object in a list of objects.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public struct BindingMemberInfo

NameDescription
System_CAPS_pubmethodBindingMemberInfo(String)

Initializes a new instance of the BindingMemberInfo class.

NameDescription
System_CAPS_pubpropertyBindingField

Gets the property name of the data-bound object.

System_CAPS_pubpropertyBindingMember

Gets the information that is used to specify the property name of the data-bound object.

System_CAPS_pubpropertyBindingPath

Gets the property name, or the period-delimited hierarchy of property names, that comes before the property name of the data-bound object.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to this BindingMemberInfo.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodGetHashCode()

Returns the hash code for this BindingMemberInfo.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns the fully qualified type name of this instance.(Inherited from ValueType.)

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticEquality(BindingMemberInfo, BindingMemberInfo)

Determines whether two BindingMemberInfo objects are equal.

System_CAPS_puboperatorSystem_CAPS_staticInequality(BindingMemberInfo, BindingMemberInfo)

Determines whether two BindingMemberInfo objects are not equal.

The BindingMemberInfo is returned by the BindingMemberInfo property of the Binding class.

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

The following code example prints the BindingPath, BindingField, BindingMember for each control on a form.

private void PrintBindingMemberInfo()
{
   foreach(Control c in this.Controls)
   {
      foreach(Binding b in c.DataBindings)
      {
         Console.WriteLine("\n" + c.ToString());
         BindingMemberInfo bInfo = b.BindingMemberInfo;
         Console.WriteLine("Binding Path \t" + bInfo.BindingPath);
         Console.WriteLine("Binding Field \t" + bInfo.BindingField);
         Console.WriteLine("Binding Member \t" + bInfo.BindingMember);
      }
   }
}

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft