296 Part II Programming Fundamentals
To Do This
Reorder the contents
of an array
Use methods in the Array class of the .NET Framework. To sort an array
named RandArray in ascending order, use the Array.Sort method as
follows:
Array.Sort(RandArray)
To reverse the order of an array named RandArray, use the Array.Reverse
method as follows:
Array.Reverse(RandArray)
To give the user visual
feedback during long
calculations
Add a ProgressBar control to your form. (You can find the ProgressBar
control on the Common Controls tab of the Toolbox .) Set the Minimum,
Maximum, and Value properties for the control by using program code.
The counter variable in a For... Next loop often offers a good way to set
the Value property.