Randomly Shuffle the Contents of an Array

Category:
Lists, Collections and Arrays
Type:
Snippets
Difficulty:
Intermediate
Author:
Intelligent Solutions Inc.

Version Compatibility:

More information:
This snippet demonstrates a way to randomly shuffle the contents of an array. Though an integer array is used, you can use the same technique for an array of any type.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: