共用方式為


BindingsCollection.AddCore(Binding) 方法

定義

Binding 加入集合。

protected:
 virtual void AddCore(System::Windows::Forms::Binding ^ dataBinding);
protected virtual void AddCore (System.Windows.Forms.Binding dataBinding);
abstract member AddCore : System.Windows.Forms.Binding -> unit
override this.AddCore : System.Windows.Forms.Binding -> unit
Protected Overridable Sub AddCore (dataBinding As Binding)

參數

dataBinding
Binding

要加入至集合的 Binding

例外狀況

dataBinding 引數以前是 null

範例


Private Sub BindControl()
   Dim ds As DataSet
   ' Not shown: code to populate DataSet with tables.
   Text1.DataBindings.Add("Text", ds.Tables("Products"), "ProductName")
   Label1.DataBindings.Add("Text", ds.Tables("Suppliers"), "CompanyName")
   
End Sub

適用於