I am trying to determine whether a string input by a user is valid for representing a path to a folder. By valid, I mean formatted properly.
In my application, the f
Use this Code
string DirectoryName = "Sample Name For Directory Or File"; Path.GetInvalidFileNameChars() .Where(x => DirectoryName.Contains(x)) .Count() > 0 || DirectoryName == "con"