Multiple choice technology programming languages

Which of these string definitions will prevent escaping on backslashes in C#?

  1. string s = #"Test string";

  2. string s = ."Test string";

  3. string s = @"Test string";

  4. string s = &"Test string";

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The @ prefix creates verbatim strings where backslashes are literal characters, useful for file paths like @"C:\Path\File.txt" instead of escaping each backslash. This prevents escape sequence interpretation.