So I have this switch in order to set a wait time
public int Option(string arg)
{
switch (arg)
{
case "/t:Max":
return 0;
case "/t:Med":
return 1000;
case "/t:Min":
return 2000;
default: return 0;
}
}
How can I use enum for /t:Min, /t:Med, /t.Max in order to replace the switch?
Indeed something like:
enum t
{
/t:Min,
/t:Med,
/t:Max
};
Your enumeration should be like this:
and convert your switch to this: