Bal*_*nyi 22
Console.WriteLine("\"\" Hello world \"\"");
Run Code Online (Sandbox Code Playgroud)
要么
Console.WriteLine(@""""" Hello world """"");
Run Code Online (Sandbox Code Playgroud)
如果你想在一个字符串中加上双引号,你需要用一个字符串来转义它们 \
例如:
string foo = "here is a \"quote\" character";
Run Code Online (Sandbox Code Playgroud)
如果你想输出"" Hello World ""那么你需要:
string helloWorld = "\"\" Hello World \"\"";
output(helloWorld);
Run Code Online (Sandbox Code Playgroud)
(其中输出是您用于输出的任何方法)