private static void KeywordExample()
{
string string = "Some String";
}
Might be you still want to use ‘bool’, ‘string’ etc. But using this will throw “identifier expected, 'keyword' is a keyword - Compiler Error CS1041” A reserved word for the C# language was found where an identifier was expected. Replace the keyword with a user-specified identifier.
To overcome this error, prefix the identifier with “@”. The character @ is not actually part of the identifier, so the identifier might be seen in other languages as a normal identifier, without the prefix. An identifier with an @ prefix is called a verbatim identifier.
private static void KeywordExample()
{
string @string = "Some String";
Console.Write(@string);
}