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

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

This C# program calculates and displays an upper triangular matrix based on user input. Problem Statement: The program takes the...
This C# program serves as a demonstration of bitwise operators, which are fundamental operators used for manipulating individual bits in...
This C# program is designed to interchange or swap the columns of a matrix. A matrix is a two-dimensional array...