Chorn Sokun's Weblog

Conquer inner fear, push it to the limit!

Relative local file path to Uri

leave a comment »

It just another weekend in my life time; let write a few line of code for fun.

// Do you know you can easily conver file with relative path to an Uri object?
// of cause you do :D
var fileInfo = new FileInfo(@"..\Files\TGIS.xls");
var uri = new Uri(fileInfo.Fullname);

Hope you enjoy your weekend :D

Advertisements

Written by Chorn Sokun

September 11, 2010 at 10:27 am

Posted in Tips & Tricks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: