How can I take a List and order it by random?
List< Testimonial > testimonials = new List< Testimonial >();
testimonials.Add(new Testimonial {1} );
testimonials.Add(new Testimonial {2} );
testimonials.Add(new Testimonial {2} );
testimonials.Add(new Testimonial {3} );
testimonials.Add(new Testimonial {4} );
How would I use
testimonials.OrderBy<>
in order to make it random?
Here is the solution for that.
Source Link: http://www.dreamincode.net/code/snippet4233.htm
This Method will randomize any Generic list in C#