c# remove string with quotes from string -
this question has answer here:
i have string, containing xml namespace, , cant seem remove part
xmlns="http://www.rar.org/xyz/"
i've tried
return textwriter.tostring().replace(@"xmlns="http://www.rar.org/xyz/"", "");
but not compile.
you need escape string. since providing verbatim string literal (by using @), need use 2 quotes escape it:
return textwriter.tostring().replace(@"xmlns=""http://www.rar.org/xyz/""", "");
Comments
Post a Comment