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

适用于