Check out example codes for "Linq - Random Elements". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com