Answers for "linq pick random element"

C#
2

Linq - Random Elements

var rnd = new Random();
var SelectedPost = q.OrderBy(x => rnd.Next()).Take(1);
Posted by: Guest on June-05-2020
0

linq pick random element

var rand = new Random();
var user = users[rand.Next(users.Count)];
Posted by: Guest on February-17-2021

Code answers related to "linq pick random element"

C# Answers by Framework

Browse Popular Code Answers by Language