BaseControlArray.Count 方法

定義

傳回控制項陣列中的控制項數目。Returns the number of controls in a control array.

public:
 short Count();
public short Count ();
member this.Count : unit -> int16
Public Function Count () As Short

傳回

Short,包含控制項數目。A Short that contains the number of controls.

備註

您可以使用中的此屬性做為 .。。下一個語句,以在控制項陣列中的控制項上執行運算。You can use this property in a For...Next Statement to perform an operation on the controls in a control array.

BaseControlArray 類別是從 Visual Basic 6.0 升級之應用程式中所使用之所有控制項陣列的基類。The BaseControlArray class is the base class for all control arrays used in applications upgraded from Visual Basic 6.0.

注意

Microsoft.VisualBasic.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. 在大多數情況下,這些函式和物件會複製在 .NET Framework.NET Framework 的其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework.NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework.NET Framework 實作有顯著差異時,才需要這些項目。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework.NET Framework implementation.

適用於