BindingsCollection.Item[Int32] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定索引處的 Binding。
public:
property System::Windows::Forms::Binding ^ default[int] { System::Windows::Forms::Binding ^ get(int index); };
public System.Windows.Forms.Binding this[int index] { get; }
member this.Item(int) : System.Windows.Forms.Binding
Default Public ReadOnly Property Item(index As Integer) As Binding
參數
屬性值
指定之索引處的 Binding。
例外狀況
集合在指定索引處不包含項目。
範例
下列範例會 BindingMember 列印控制項 中 BindingsCollection 每個 Binding 的值。
void PrintBindingInfo()
{
BindingsCollection^ bc = text1->DataBindings;
for ( int i = 0; i < bc->Count; i++ )
Console::WriteLine( bc[ i ]->BindingMemberInfo.BindingMember );
}
private void PrintBindingInfo()
{
BindingsCollection bc = text1.DataBindings;
for(int i = 0; i < bc.Count; i++)
Console.WriteLine(bc[i].BindingMemberInfo.BindingMember);
}
Private Sub PrintBindingInfo()
Dim bc As BindingsCollection = Text1.DataBindings
Dim i As Integer
For i = 0 to bc.Count - 1
Console.WriteLine(bc(i).BindingMemberInfo.BindingMember)
Next i
End Sub