samedi 19 novembre 2022

How Can I randomly display/print/select 4 elements in a list without repetition in C#?

 
            List<string> topLevel = new List<string>();
            

          


            topLevel.Add("000");
            topLevel.Add("100");
            topLevel.Add("200");
            topLevel.Add("300");
            topLevel.Add("400");
            topLevel.Add("500");
            topLevel.Add("600");
            topLevel.Add("700");
            topLevel.Add("800");
            topLevel.Add("900");

I tried with while loops, for loops and LINQ, but got nothing to work




Aucun commentaire:

Enregistrer un commentaire