我有一个弦
good overview of ESP's in more detail than you probably need。
good overview of ESP's in more detail than you probably need
插入SQL表时出现错误。所以我想用双撇号代替字符串中的撇号
good overview of ESP''s in more detail than you probably need
如何在C#中操纵它?
非常简单:
string s = "good overview of ESP's in more detail than you probably need."; string escaped = s.Replace("'","''");
注意:使用命令参数通常更安全。特别是如果输入字符串的值不受您的代码(即用户输入)控制。