Login   /   Register
Select Level: All

Sorting a String Array

April 2nd, 2008 by daniva
     2 votes, average: 4 out of 52 votes, average: 4 out of 52 votes, average: 4 out of 52 votes, average: 4 out of 52 votes, average: 4 out of 5
Loading ... Loading ...

Sorting arrays in VBScript has never been easy; that’s because VBScript doesn’t have a sort command of any kind. In turn, that always meant that VBScript were forced to write their own sort routines, be that a bubble sort, a heap sort, a quicksort, or some other type of sorting algorithm.

But that was before the advent of the .NET Framework. If you have the .NET Framework installed on your computer then you can sort an array using code no more complicated than this:

Appending two Arrays

April 1st, 2008 by daniva
     1 votes, average: 4 out of 51 votes, average: 4 out of 51 votes, average: 4 out of 51 votes, average: 4 out of 51 votes, average: 4 out of 5
Loading ... Loading ...

Using common VBScript is impossible to append on array to another. It is possible using the System.Collections.ArrayList object
The AppendRange method adds the elements of an array to the end of the ArrayList.

Retrieve ArrayList information

April 1st, 2008 by daniva
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...

The ArrayList object Implements the IList interface using an array whose size is dynamically increased as required.