If value
is the keyword in C# and keywords cannot be used as a name (identifier) of a variable, class, interface, etc.
How can value
still be used as a variable?
public static void Main(string[] args)
{
int value =2;
Console.WriteLine(value);
}
value
is a Contextual Keyword, which means it depends on the context, its not a Reserved Word.Contextual Keywords
Here is a list of keywords that are reserved and will need to be prefixed with the
@
symbolC# Keywords