string txt = "";foreach (char ch in Path.GetInvalidFileNameChars()){ if (Char.IsWhiteSpace(ch) || Char.IsControl(ch)) { txt += "<" + (int)ch + "> "; } else { txt += ch + " "; }}lblInvalidFileNameChars.Text = txt;txt = "";foreach (char ch in Path.GetInvalidPathChars()){ if (Char.IsWhiteSpace(ch) || Char.IsControl(ch)) { txt += "<" + (int)ch + "> "; } else { txt += ch + " "; }}lblInvalidPathChars.Text = txt;
What did you think of this article?
Submitted comments are subject to moderation before being displayed.
Name
Email (will not be published)
Website
Subscribe to this post Subscribe to this blog Remember me
Comments