ArrayList

Cableguy

Expert
Licensed User
Longtime User
ArrayList("xpto").Sort(cCaseUnsensitive) is not recognized as a valid option!
 

Cableguy

Expert
Licensed User
Longtime User
Thanks Klaus, then it's just a minor error on the help-file...

Sorts the ArrayList.
Syntax: Sort (Compare Constant)
Compare Constant could be:
cNumbers - All values are numbers (9 will be sorted before 10)
cCaseSensitive - Sorts strings.
cCaseUnsensitive - Sorts string.
Example:
Sub App_Start
Form1.Show
ArrayList1.Add("apple")
ArrayList1.Add("A")
ArrayList1.Add("cat")
ArrayList1.Add("bee")
ArrayList1.Sort(cCaseSensitive)
For i = 0 to ArrayList1.Count-1
ListBox1.Add(ArrayList1.Item(i))
Next
End Sub
This example fills a ListBox with the items from the sorted ArrayList.
 
Top