.Net: How do I check for illegal characters in a path?

Posted by Mike Pateras on Stack Overflow See other posts from Stack Overflow or by Mike Pateras
Published on 2010-03-12T21:04:44Z Indexed on 2010/03/12 21:07 UTC
Read the original article Hit count: 188

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about path

Related posts about illegal-characters