C# Error CS1646 – Keyword, identifier, or string expected after verbatim specifier: @

C# Error

CS1646 – Keyword, identifier, or string expected after verbatim specifier: @

Reason for the Error & Solution

Keyword, identifier, or string expected after verbatim specifier: @

See string literals for the usage of the verbatim specifier ‘@’. The verbatim specifier is only allowed before a string, keyword or identifier. To resolve this error, remove the @ symbol from any inappropriate place or add the intended string, keyword or identifier.

The following sample generates CS1646:

// CS1646  
class C  
{  
   int i = @5;  // CS1646  
   // Try this line instead:  
   // int i = 5;  
}  

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

C# Compiler Error CS0442 – ‘Property’: abstract properties cannot have private accessors Reason for the Error You’ll get this error...
This is a really simple one . Below is a simple example of an enum called “Designation” defined with the...
This blog post explain the usage of the Checked Block in .NET and how you can use them in Visual...