问题描述
Chrome 版本:90.0.4430.212
输入 "1\n2" 然后输入 "enter" 显示 "\n" 字符串
输入“console.log('1\n2')”然后输入“enter”显示正常
解决方法
控制台将 \n 读取为新行,并以换行符的方式输出。
如果你想在控制台中看到 \n 使用 JSON.stringify()。
示例:
parameters.ReferencedAssemblies.AddRange(references);
CompilerResults compiledCode = compiler.CompileAssemblyFromSource(parameters,code);