.Net: How do I check for illegal characters in a path?
- by Mike Pateras
Is there a way to check if a String meant for a path has invalid characters, in .Net? I know I could iterate over each character in Path.InvalidPathChars to see if my String contained one, but I'd prefer a simple, perhaps more formal, solution.
Is there one?