共用方式為


BindingContext.ICollection.Count 屬性

定義

取得由 CurrencyManager 管理的 BindingContext 物件總數。

property int System::Collections::ICollection::Count { int get(); };
int System.Collections.ICollection.Count { get; }
member this.System.Collections.ICollection.Count : int
 ReadOnly Property Count As Integer Implements ICollection.Count

屬性值

BindingContext 管理的資料來源數目。

實作

範例

下列程式碼範例會傳回 所 BindingContext 管理的物件數目 CurrencyManager

private:
   void PrintCount()
   {
      Console::WriteLine( "BindingContext->Count {0}",
      ( (ICollection^)(this->BindingContext) )->Count );
   }
private void PrintCount(){
   Console.WriteLine("BindingContext.Count " + ((ICollection) this.BindingContext).Count);
}
Private Sub PrintCount()
   Console.WriteLine("BindingContext.Count " _
      + CType(Me.BindingContext, ICollection).Count.ToString())
End Sub

適用於