Chr*_*all 2 c# app-config string-formatting
这是来自App.Config的一行:
<add key="CheckFileFormatString" value="P{0}\t"{1}, {2}"\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}"/>
Run Code Online (Sandbox Code Playgroud)
这是将其放入字符串的代码(请忽略不推荐的.AppSettings.Get调用,除非这是问题):
string format = ConfigurationSettings.AppSettings.Get("CheckFileFormatString");
Run Code Online (Sandbox Code Playgroud)
......这是结果字符串:
P{0}\\t\"{1}, {2}\"\\t{3}\\t{4}\\t{5}\\t{6}\\t{7}\\t{8}\\t{9}\\t{10}
Run Code Online (Sandbox Code Playgroud)
额外的反斜杠来自哪里?