如何在 C# 字符串中用双引号 (") 替换单引号 (')?
您需要对引号符号使用正确的转义序列,您可以找到有关转义序列的更多信息here http://msdn.microsoft.com/en-us/library/h21280bw.aspx.
String stringWithSingleQuotes= "src='http://...';";
String withDoubleQuotes = stringWithSingleQuotes.Replace("'","\"");
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)