string invalid = new string(Path.GetInvalidFileNameChars()) + new string(Path.GetInvalidPathChars());
foreach (char c in invalid){ illegal = illegal.Replace(c.ToString(), ""); }