VB.Net - DataTypes - ArrayList

ArraryList

A .Net datatype designed to hold an array list of data.

Here’s an example of usage

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Dim myArray As New ArrayList

Dim Inc As String = args(1)

Dim ProposedNow As System.DateTime

dim MaxEntries as integer = 12


While myArray.Count < MaxEntries
'
' now advance the proposed now by the amount specified in the recurrence pattern
'
myArray.Add(ProposedNow)

ProposedNow = DateAdd("m", CInt(Inc), ProposedNow)

End While

Return myArray.ToArray(GetType(System.DateTime))

You can sort items in the arraylist using the .Sort method.

If the array list is holding a Structure object then you need to implement the CompareTo interface.