c# example learn enum switch
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;
}