/// <returns>True if valid</returns>\r
private bool IsValidAutonameFormat(string input, bool isSilent)\r
{\r
+ char[] invalidchars = Path.GetInvalidFileNameChars();\r
+ Array.Sort(invalidchars);\r
foreach (var characterToTest in input)\r
{\r
- // we binary search for the character in the invalid set. This should be lightning fast.\r
- if (Array.BinarySearch(Path.GetInvalidFileNameChars(), characterToTest) >= 0)\r
+ if (Array.BinarySearch(invalidchars, characterToTest) >= 0)\r
{\r
if (!isSilent)\r
{\r