0
Console.WriteLine("|/                       \|");

When I try to write this in the console, it thinks the slashes are escape sequences (that are unknown), and returns the error:

Compilation error (line 22, col 48): Unrecognized escape sequence
  • 1
    Since an escape character means "interpret the following character specially", what do you think an escape character followed by an escape character means? – Scott Hunter Jul 08 '22 at 18:10

1 Answers1

3

Either use raw strings:

Console.WriteLine(@"|/                       \|");

Or escape your slash:

Console.WriteLine("|/                       \\|");
Blindy
  • 65,249
  • 10
  • 91
  • 131