Horje
how to pick a random item in c# Code Example
how to pick a random item in c#
using System;
using System.Collections.Generic;
namespace Demo {
   class Program {
      static void Main(string[] args) {
         var random = new Random();
         var list = new List<string>{ "one","two","three","four"};
         int index = random.Next(list.Count);
         Console.WriteLine(list[index]);
      }
   }
}




Csharp

Related
how to remove last 3 characters from string in c# Code Example how to remove last 3 characters from string in c# Code Example
add items to listbox from text file c# Code Example add items to listbox from text file c# Code Example
get random from list c# Code Example get random from list c# Code Example
c# remove spaces from string Code Example c# remove spaces from string Code Example
c# get set value Code Example c# get set value Code Example

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