Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# random generator

// One string will be randomly picked and displayed 
Random rnd = new Random();
string[] secOptions = {"string one", "string two", "string three"};
int randomNumber = rnd.Next(0, 3);
string secText = secOptions[randomNumber];
Console.WriteLine(secText);
 
PREVIOUS NEXT
Tagged: #random #generator
ADD COMMENT
Topic
Name
7+4 =