Tuesday, June 17, 2014

Strip double quotes from a string in .NET

I think your first line would actually work but I think you need four quotation marks for a string containing a single one (in VB at least):
s = s.Replace("""", "")
for C# you'd have to escape the quotation mark using a backslash:
s = s.Replace("\"", "");

http://stackoverflow.com/questions/1177872/strip-double-quotes-from-a-string-in-net

No comments:

Post a Comment