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

smartface.io - Proper way to change color scheme for whole application -

javascript - three.js lot of meshes optimization -

Email notification in google apps script -