C# Uri LocalPath
Description
Uri LocalPath
gets a local operating-system representation
of a file name.
Syntax
Uri.LocalPath
has the following syntax.
public string LocalPath { get; }
Example
The following example creates a Uri instance and writes the local path to the console.
//from w w w . ja v a2 s.c o m
using System;
public class MainClass{
public static void Main(String[] argv){
Uri uriAddress2 = new Uri("file://server/filename.ext");
Console.WriteLine(uriAddress2.LocalPath);
}
}
The code above generates the following result.