BaseControlArray.UBound 方法


傳回 Short,其中包含控制項陣列的最大可用註標。Returns a Short that contains the largest available subscript for a control array.

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



Short,包含控制項陣列的上限。A Short that contains the upper bounds of a control array.


UBound函數會與函式搭配使用 LBound ,以決定控制項陣列的大小。The UBound function is used with the LBound function to determine the size of a control array.

BaseControlArray類別是從 Visual Basic 6.0 升級的應用程式中所使用之所有控制項陣列的基類(base class)。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 其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework 實作有顯著差異時,才會需要這些函式和物件。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.