The easiest way to check if a path is an UNC path is of course to check if the first character in the full path is a letter or backslash. Is this a good solution or could there be problems with it?
My specific problem is that I want to create an System.IO.DriveInfo-object if there is a drive letter in the path.
Try this extension method:
public static bool IsUncPath(this string path)
{
return Uri.TryCreate(path, UriKind.Absolute, out Uri uri) && uri.IsUnc;
}