I need a robust and simple way to remove illegal path and file characters from a simple string. I've used the below code but it doesn't seem to do anything, what am I missing?
using System;
using System.IO;
namespace …
The following code generates a compiler error about an "unrecognized escape sequence" for each backslash:
string foo = "D:\Projects\Some\Kind\Of\Pathproblem\wuhoo.xml";
I guess I need to escape backslash? How do I do that?