using System;
public class Program
{
public static void Main()
var uri = new Uri("/home/user/C#/foo/bar.txt");
Console.WriteLine(uri.LocalPath);
}