Linq - Random Elements

51

Linq - Random Elements -

var rnd = new Random();
var SelectedPost = q.OrderBy(x => rnd.Next()).Take(1);

Comments

Submit
0 Comments