I have one enum like below
public enum Colors
{
red,
blue,
green,
yellow
}
I want to use it switch case
public void ColorInfo(string colorName)
{
switch (colorName)
{
// i need a checking like (colorname=="red")
case Colors.red:
Console.log("red color");
break;
}
}
I am getting following error
Cannot implicitly convert type 'Color' to string
Can anyone help on this ..