/***************************************************************************************** * Function : SendWord() * * Description : Creates a random class instance * Assings min value and max value from oldWordList to "word" instance * Display the word * * ******************************************************************************************/ public void SendWord(object ob) { //Creates a random class instance Random random = new Random(); //assings min value and max value from oldWordList to "word" instance wordContainer.word word = oldWordList[random.Next(0, oldWordList.Count - 1)]; //if there is some word if (this.DisplayWord != null) { //it will be displayed this.DisplayWord(this, new WordEventArgs(word)); } }
//Constructor public WordEventArgs(wordContainer.word word) { Word = word; }