共用方式為


BindingMemberInfo 結構

定義

包含資訊以啟用 Binding 解析資料繫結 (Data Binding) 至物件的屬性,或者至物件清單中目前物件的屬性。

public value class BindingMemberInfo
public value class BindingMemberInfo : IEquatable<System::Windows::Forms::BindingMemberInfo>
public struct BindingMemberInfo
public struct BindingMemberInfo : IEquatable<System.Windows.Forms.BindingMemberInfo>
public readonly struct BindingMemberInfo : IEquatable<System.Windows.Forms.BindingMemberInfo>
type BindingMemberInfo = struct
Public Structure BindingMemberInfo
Public Structure BindingMemberInfo
Implements IEquatable(Of BindingMemberInfo)
繼承
BindingMemberInfo
實作

範例

下列程式碼範例會 BindingPath 列印表單上每個控制項的 、 BindingFieldBindingMember

private:
   void PrintBindingMemberInfo()
   {
      for each ( Control^ c in this->Controls )
      {
         for each ( Binding^ b in c->DataBindings )
         {
            Console::WriteLine( "\n {0}", c );
            BindingMemberInfo bInfo = b->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 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);
      }
   }
}
Private Sub PrintBindingMemberInfo()
  Dim c As Control
  Dim b As Binding
  For Each c In  Me.Controls         
     For Each b In  c.DataBindings
        Console.WriteLine(ControlChars.Cr + c.ToString())
        Dim bInfo As BindingMemberInfo = b.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 b
   Next c
End Sub

備註

BindingMemberInfo 類別的 Binding 屬性傳 BindingMemberInfo 回 。

BindingMemberInfo會從傳遞至建構函式的 BindingMemberInfo 字串建立 。

建構函式

BindingMemberInfo(String)

初始化 BindingMemberInfo 類別的新執行個體。

屬性

BindingField

取得資料繫結物件的屬性名稱。

BindingMember

取得資訊,用於指定資料繫結物件的屬性名稱。

BindingPath

取得屬性名稱,或位在資料繫結物件之屬性名稱前以句號分隔的屬性名稱階層架構。

方法

Equals(BindingMemberInfo)

指出目前的物件是否等於另一個相同類型的物件。

Equals(Object)

判斷指定的物件是否等於這個 BindingMemberInfo

GetHashCode()

傳回這個 BindingMemberInfo 的雜湊程式碼。

運算子

Equality(BindingMemberInfo, BindingMemberInfo)

判斷兩個 BindingMemberInfo 物件是否相等。

Inequality(BindingMemberInfo, BindingMemberInfo)

判斷兩個 BindingMemberInfo 物件是否不相等。

適用於

另請參閱