StringBuilder builtString = new StringBuilder(); string startQuote = "\""; //start quote string endQuote = "\""; //end quote string nextEntry = "\r\n"; //new line next entry string comma = ","; string slash = "\\"; //we use batchcols to specifiy header info. string batchcols = "number,message"; string number1 = "27730367747"; string message = startQuote + "Testssss, thissss is a comma test.Please ignore plz." + slash + endQuote; Debug.WriteLine(message); builtString.Append(startQuote); builtString.Append(number1); builtString.Append(comma); builtString.Append(slash); builtString.Append(message); builtString.Append(endQuote); final = builtString.ToString();
Quote:"\"27730367747,\\\"Testssss, thissss is a comma test.Please ignore plz.\\\"\""
Quote:"27730367747,\"Testssss, thissss is a comma test.Please ignore plz.\""
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)