I have a question with the List<>
datatype in C#. I have a List of colors (List<Color> colores
) in a program that I am doing in Windows Forms, but I want that everytime that start the program this list mess up it of random form. I am searching a method as colores.Disort()
but this doesn't exist.
Any ideas?
My array to disort is:
Color[] colores = new Color[] {
Color.FromArgb(128, 128, 255),
Color.FromArgb(255, 128, 128),
Color.FromArgb(255, 192, 128),
Color.FromArgb(255, 255, 128),
Color.FromArgb(255, 255, 128),
Color.MediumPurple};
PD: I don't want a method of multiple lines, just a short method. The colors shouldn't repeat it.
Thanks you for your time!