vendredi 20 mars 2015

Random words from array for Hangman

Ok, what exactly am I doing wrong here. I've tried a different things to return a random word from the array words but keep getting errors. The syntax appears to be similar to what I've read up on. Thanks.



string GetRandomWords()
{
WordBook[] words = new WordBook[26];
Random = new Random();

return words[Random.Next(0, words.Length)];

Aucun commentaire:

Enregistrer un commentaire