Error: escape sequence not recognized [C #]

2

For this code snippet in my program I get the error alert that it considers that the command has an invalid, ie unrecognized escape sequence.

string.Format("/c {0}", "cd .\Debug & imagem.png");

How to proceed and make it able to recognize the code?

    
asked by anonymous 20.09.2018 / 16:31

1 answer

4

The following link demonstrates how to ignore this: ERROR CS1009

Basically, in the case presented it would suffice if the character at @ was placed in front of the command or that another slash \ was inserted into the command. Home Staying like this:

@"cd .\Debug & imagem.png"

or

"cd .\Debug & imagem.png"
    
20.09.2018 / 16:31