Horje
get random from list c# Code Example
random from list c#
list[Random.Range(0, list.Count)];
c# randomize a list
var shuffledcards = cards.OrderBy(a => Guid.NewGuid()).ToList();
get random from list 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
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
message uwp c# Code Example message uwp c# Code Example
readonly vs const c# Code Example readonly vs const c# Code Example
C# Cast double to float Code Example C# Cast double to float Code Example

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