I remember using enum
s in a switch
statement in the past, and according to C# how to use enum with switch I am doing it the right way. But I've just tried to do it again and I received the following error:
'ApplicationMode' is a 'type' but is used like a 'variable'.
Here's the code I am using:
public static enum ApplicationMode
{
Edit,
Upload,
Sync,
None
}
private void edit_Click(object sender, EventArgs e)
{
switch(ApplicationMode) // This is where I see the error.
{
case ApplicationMode.Edit:
break;
...
}
}
What have I done wrong?