c# - A question regarding the syntax to escape a quotation mark inside a verbatim string -


Why is it necessary to add two extra quotation marks to avoid a set of quotation marks inside a verbatim string?

  string s = "" "" "" "" "" Note: The three codes on both sides  

The previous code generates the following string: Hi "

The symbol of the curriculum means that it is literally an unrecognized string, however" unchanged "Because you still need some methods to represent double quotes in the uncompressed string literals. To do this, you only enter two double quotes together. Your string can also be written as:

  string s = "\" h \ "";  

Comments