I'm trying to generate a random integer which is responsible for selecting information from the array given below, in this case it's supposed to get a question (1 to 5) and store it in the string.
but i cant seem to convert the random to int. Does anyone have suggestions on a possible solution?
Random rand = new Random().Next(1, 5);
int randNum = rand.Next(1, 5);
string tekstvraag = vragen.GetValue(vraag, randNum);
Aucun commentaire:
Enregistrer un commentaire