ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Code inspection: Redundant verbatim string prefix

Last modified: 24 August 2024

This inspection reports the @ character (the verbatim string literal prefix) if it is unnecessary in a specific string. A verbatim string literal in C# allows you to include backslashes and quotes without escaping them, as well as to write multi-line strings. If a string is a single-line and does not contain any characters that require escaping, the verbatim string prefix is redundant and can be safely removed without changing the meaning of the string.