Horje
random value in array c# Code Example
random value in array c#
 Random random = new Random();
 int value = random.Next(0, array.Length);
 Console.Write(array[value]);
c# pick a random item from array
string[] names = new string[] { "name1", "name2", "name3" };
Random rnd = new Random();
int index = rnd.Next(names.Length);
Console.WriteLine($"Name: {names[index]}");




Csharp

Related
asp.net c# write string to text file Code Example asp.net c# write string to text file Code Example
Creating a button Dynamically c# winform Code Example Creating a button Dynamically c# winform Code Example
unity mouse click m Code Example unity mouse click m Code Example
write string multiple times c# Code Example write string multiple times c# Code Example
round to float unity Code Example round to float unity Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
15