comp • gb • object[]

Object[] (gb)

This class implements a dynamic array of Object references.

This class inherits Array.
This class is
Create an array of Object references.
creatable
.
This class acts like a
Returns data stored in the array at Index.
read
/
Modifies the data stored in the array at Index.
write
array.
This class is
Enumerates each object stored in the array.
enumerable
with the FOR EACH keyword.

Properties

Methods
Returns a virtual class representing the bounds of each array dimension.
Bounds  
Returns the number of elements in the array.
Count  
Returns a pointer to the array data.
Data  
Returns the number of dimensions of an array.
Dim  
Returns the number of elements in the array.
Length  
Returns the greatest index of the array.
Max  
Returns the type of data that can be put into the array.
Type  
Inserts an element into the array at the position specified by Index.
Add  
Clears the array.
Clear  
Returns a deep copy of the array.
Copy  
A synonymous for Extract.
Delete  
Returns TRUE if the specified object exists in the array.
Exist  
Check if a specific object is stored in the array.
ExistByRef  
Removes one or more elements from the array, and returns them.
Extract  
Fills the array with the specified value.
Fill  
Returns the position of the first occurrence of Value in the array.
Find  
Return the position of the first occurrence of a specific object in the array.
FindByRef  
Insert an array into the current one at the position specified by Pos.
Insert  
Removes the last element of the array and returns it.
Pop  
Adds an element at the end of the array.
Push  
Removes one or more elements from the array.
Remove  
Resizes the array.
Resize  
Reverse the order of array elements, and return the array.
Reverse  
Sorts the array.
Sort  

Example

This example shows how to create an array of TextBoxes

Public aobjDisplay As New Object[9, 9]

Public Sub Form_Open()
Dim r As Integer
Dim c As Integer
Dim objTextBox As TextBox

For r = 0 To 8
    For c = 0 To 8
      objTextBox = New TextBox(Me) ' create the next of the 9*9 TextBoxes
      objTextBox.Y = 9 + r * 40
      objTextBox.X = 9 + c * 40
      objTextBox.Width = 32
      objTextBox.Height = 32
      aobjDisplay[r, c] = objTextBox
    Next '    c
  Next '      r
End