OK. Your code compiles now.
I am surprised to find that rather than throw a compile error, VS simply discards the @ so that your
enum
is compiled as if it was
enum Fruits
{
apple = -1,
Apple = 1,
Grapes = 2,
...............
...............
}
which is why the @ doesn't print. As Dalek Dave said in his answer VS seems to be treating it as whitespace.
You can test that this is happening because when you try to use the enum in code, intellisense only shows the modified version.
Two suggestions:
1. If the @ is important test for 'apple' and
if (f == Fruits.apple)
{
Console.WriteLine('@' + f);
}
2. Edit your question again (or ask a new question) describe what it is that you are trying to achieve. Someone may be able to offer an alternative.