Question How to get a specific element from the list value?

bartoszk

New member
Joined
Nov 26, 2014
Messages
1
Programming Experience
Beginner
Hi,
Here's some code I have in C#:

C#:
List<Color> colorList = new List<Color>()
{
Color.FromArgb(alfa, 0, 255, 255),
Color.FromArgb(alfa, 0, 255, 0),
Color.FromArgb(alfa, 64, 255, 0),
Color.FromArgb(alfa, 128, 255, 0),
Color.FromArgb(alfa, 192, 255, 0),
Color.FromArgb(alfa, 255, 255, 0),
Color.FromArgb(alfa, 255, 192, 0),
Color.FromArgb(alfa, 255, 128, 0),
Color.FromArgb(alfa, 255, 64, 0),
Color.FromArgb(alfa, 255, 0, 0)
};
How can I get the specific list element value? For example:
C#:
if(true)
{
//get value 192 from Color.FromArgb(alfa, 192, 255, 0)
}
 
Top Bottom