0

I'm trying to print \"Hey\" in the Console But when I run it It just print the "Hey" without \ and when i put another \ in the beginning and \ in end it says theres an Error

Farhad Zamani
  • 4,279
  • 2
  • 12
  • 34
Eden Ichak
  • 13
  • 6

1 Answers1

4

You have to escape the " as well as the \. Both should be escaped with a backslash itself. Your final result should look something like: Console.WriteLine("\\\"Hey\\\"");

CitrusPunk
  • 394
  • 5
  • 15