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