if (!Regex.IsMatch(diskName, @"^[c-zC-Z](:\\)?$")) { throw new FormatException($"{diskName} is not an effective disk name."); }
if (!Regex.IsMatch(diskName, @"^[c-zC-Z](:\\)?$")) { throw new FormatException($"{diskName} is not an effective disk name."); }
转载于:https://www.cnblogs.com/144823836yj/p/9656410.html