I'm trying to trim a string of some character so I can put it in an SQL query. An example of what is being passed to my method is "\n asdw_value\n". I want the "\n"s and the space to be removed, but I can't get the "\n" to go away. My code now looks like this :
element = element.Replace("\\", "");
element = element.Replace("n", "");
element = element.Replace(" ", "");
And the output has been "\nasdq_value\n" Any help is appreciated.