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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -