I'm attempting to display the contents of a list randomized with and without LINQ.
Normal List Output Example: Prada, Adidas, Levis, Polo, Guess
Randomized List Output Example: Polo, Adidas, Prada, Guess, Levis
List<string> clothingBrands = new List<string>()
{ "Prada","Adidas","Levis", "Polo","Gucci",
"Calvin Klein","Aeropostale","Tommy Hilfiger","Puma","American Eagle",
"Lacoste","Hollister","Guess","Under Armour","Old Navy",
"Banana Republic","Hugo Boss", "Diesel","Coach","AND1"};
private static void RandomzeClothingBrands(List<string> clothingBrands)
{
Random rnd = new Random();
int i = 1;
foreach (string item in clothingBrands)
{
Console.WriteLine($"{i}.{item}");
}
}
How can I accomplish printing out the contents of the list randomized every time?