Home » C# Programming

Reserved Keyword


I am using a reserved keyword on my application: event. So I get the error:

Identifier expected; 'event' is a keyword

This is for a Events project so event seems a normal word to use in it. 

I think I can use @even for example in:

void Create(Event @event);

Should I try to change the name or is it ok to just add the @ before the name?




1 Answer Found


Answer 1

You *can*. But is may not be a good idea.

Check out this link:


Hope this helps.

Search for  Reserved Keyword


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure