Answer the question
In order to leave comments, you need to log in
How to make a constant random call to a variable?
The variable randomPer constantly produces the same thing ... only if the console is restarted, there will be a new variable, and so on all the time. Restarting is not an option.
public static string[] okper= new string[]
{
"ok1",
"ok2"
}
public static string randomPer = okper[new Random().Next(0, okper.Length)];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question