Use this string.IndexOfAny(char[]) method to detect the presence of any of this char in a string. The char ':' is not included in this array. The only proper position for this character in a path, is the second position, just after a letter.
Requirements
Target Platforms: Windows 11, 10, 8, 7and Linux, MacOS with net10.0, net9.0 or net8.0 installed