My Goal is for this data to be randomized every time it is read into the array from a file. Any suggestions?
Code:
public void Random_Load(object sender, EventArgs e)
{
System.IO.StreamReader wordsIn;
string theWord;
wordCount = 0;
wordArray = new Word[100];
try
{
wordsIn = new System.IO.StreamReader("wordData.txt");
theWord = wordsIn.ReadLine();
while (theWord != "EOF")
{
wordArray[wordCount++] = new Word(theWord);
theWord = wordsIn.ReadLine();
}
wordsIn.Close();
}
catch (Exception ex)
{
MessageBox.Show("Error processing input file\n" + ex.Message);
}