Use the long reserved word as a variable name in C#

Yes, you can if you really want to:

private string @long;

The actual name of the variable (as reported by reflection etc) is just long; the @ sign tells the compiler to ignore the fact that it’s also a keyword.

I would very strongly advise against this, however.

Leave a Comment