Friday, April 3, 2009

Surround Commas with Double Quotes

This is how you surround commas with double quotes.
string str = "This, is, a string, with multiple, commas";
str = str.Replace(",", "\",\"");
The result will look like this:

This"," is"," a string"," with multiple"," commas

No comments:

Post a Comment