I'm creating bunch of folders using a C# console application. An XML file is parsed for different nodes and based on the values the folders are created with the same name.
One of the XML node had the following value with some unknown special character in it (ASCII code 127)
There is a special character after Foldername. I tried using String.Trim() to trim the value but had no luck. I also tried to compare the character with the list of
System.IO.Path.GetInvalidFileNameChars()
and remove it. But still no luck. How can I try to eliminate these characters before I create a folder name. The folder name will be always alpha numeric in my case.