Use String.Compare to check if a URI is a file URI

image_pdfimage_print
   
  

using System;
public class StringParsing
{
   public static void Main()
   {
   }

 static bool IsFileURI(String path)
 { 
    return (String.Compare(path, 0, "file:", 0, 5, StringComparison.OrdinalIgnoreCase) == 0);
 }
}

   
    
     


This entry was posted in Data Types. Bookmark the permalink.