J
Johnny Snead
Hey guys,
Need help with this random sort algorithm
private void cmdQuestion_Click(object sender, System.EventArgs e)
{
Random rnd = new Random(); //initialize rnd to new random object
System.Random iRnd = new System.Random();
string theNum = iRnd.Next(0,8).ToString();
lblAnswer.Text = iRnd.Next(0,8).ToString();
This gives me a random number upon the click event however I need to turn
the numeric sequence into a string value, pass an index to the random object
and parse the index against an array or an if else statement or switch.
Have many examples for a console output but none for a web application
output. any suggestions.
Thanks
Johnny
Need help with this random sort algorithm
private void cmdQuestion_Click(object sender, System.EventArgs e)
{
Random rnd = new Random(); //initialize rnd to new random object
System.Random iRnd = new System.Random();
string theNum = iRnd.Next(0,8).ToString();
lblAnswer.Text = iRnd.Next(0,8).ToString();
This gives me a random number upon the click event however I need to turn
the numeric sequence into a string value, pass an index to the random object
and parse the index against an array or an if else statement or switch.
Have many examples for a console output but none for a web application
output. any suggestions.
Thanks
Johnny