string pattern = "\\$";
string replacement = ",";
string bc = “张三$李四$王五$赵六”;
string bcresult = Regex.Replace(bc, pattern, replacement);
// bcresult="张三,李四,王五,赵六"
引入命名空间:using System.Text.RegularExpressions;
string pattern = "\\$";
string replacement = ",";
string bc = “张三$李四$王五$赵六”;
string bcresult = Regex.Replace(bc, pattern, replacement);
// bcresult="张三,李四,王五,赵六"
引入命名空间:using System.Text.RegularExpressions;