Using linq:
YourList.OrderBy(x => rnd.Next()).Take(5)
More Related Contents:
- Best way to randomize an array with .NET
- Random weighted choice
- How to get random values from array in C# [duplicate]
- How is a random number generated at runtime?
- Find items in a string collection which contain another string [closed]
- C# custom add in a List
- Creating a blocking Queue in .NET?
- How can I generate random alphanumeric strings?
- Finding holes in 2d point sets?
- Sort a list from another list IDs
- How to create List of open generic type of class?
- Filtering collections in C#
- .NET HashTable Vs Dictionary – Can the Dictionary be as fast?
- C# Set collection?
- Dictionary returning a default value if the key does not exist [duplicate]
- Algorithm for simplifying decimal to fractions
- ReadOnlyCollection or IEnumerable for exposing member collections?
- Is there anything like asynchronous BlockingCollection?
- Does List guarantee insertion order?
- How Math.Pow (and so on) actually works
- .NET – Convert Generic Collection to DataTable
- Why doesn’t Dictionary support null key? [duplicate]
- Using BindingOperations.EnableCollectionSynchronization
- Random date in C#
- How to get a random number from a range, excluding some values
- How to Quickly Remove Items From a List
- How to know the repeating decimal in a fraction?
- Algorithm for Calculating Binomial Coefficient
- linq: order by random
- How to parse a boolean expression and load it into a class?