我想将这些字符串放在列表中,该怎么做?保持的是前两行中的双""
。我该如何解决?
scriptTxt = new string[]
{
"#$language = "VBScript"",
"#$interface = "1.0"",
"crt.Screen.Synchronous = True",
"Sub Main"
};
最佳答案
scriptTxt = new string[]
{
"#$language = \"VBScript\"",
"#$interface = \"1.0\"",
"crt.Screen.Synchronous = True",
"Sub Main"
};
要么
scriptTxt = new string[]
{
@"#$language = ""VBScript""",
@"#$interface = ""1.0""",
"crt.Screen.Synchronous = True",
"Sub Main"
};
关于c# - 从列表中解析带文本的引号,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/1578501/