randomly selecting a word from a text file
Hi everyone
I'm still new in the c# programming.Can you please help on how I can randomly select words from a word document??I'm trying a hangman application(a simple one with now paintings)
(client/Server)Application
What must happen is that, a server must randomly select a word from a word document and display it on a textbox.When the client connect to the server, it must then count the alphabets on the selected word and then but _(according to the word that was selected) for the user to guess the word
Thank you in advance
asicPosted Sep 5, 2005, 3:43 PM
may be u can make an array of strings of the document file,read the document into string it into
a string,split the string into an array of strings divided by the " " space character
then make a random function in the the range from 0:size of the array string
make sure that the step of the random is an integer like 1
when u return the random number return the array index of it
vivian maponyaPosted Sep 5, 2005, 7:07 AM
KneesOfCheesePosted Sep 3, 2005, 5:55 PM