use enum with switch case c# code example
Example: c# switch case enum
public enum Operator
{
PLUS, MINUS, MULTIPLY, DIVIDE
}
switch(op)
{
case Operator.PLUS:
{
// your code
// for plus operator
break;
}
case Operator.MULTIPLY:
{
// your code
// for MULTIPLY operator
break;
}
default: break;
}