You can use relative path by using GetFullPath method of the Path class that exist in the System.IO namespace. Try this: Console.WriteLine("The relative path 'file.txt' " + System.IO.Path.GetFullPath("file.txt"));
Liked By
Write Answer
How use relative path in C#.
Join MindStick Community
You have need login or register for voting of answers or question.
Uttam Misra
12-Oct-2011https://www.mindstick.com/DeveloperSection/Beginner
Join mindstick beginners section...
Cheers!
Chris Anderson
12-Oct-2011Kenny Tangnde
11-Oct-2011Hi Rohit,
You can give me some website address to learn SQL?
thanks in advance.
Kenny Tangnde
11-Oct-2011Hi Rohit,
thanks for your help.
Chris Anderson
11-Oct-2011You can use relative path by using GetFullPath method of the Path class that exist in the System.IO namespace.
Try this:
Console.WriteLine("The relative path 'file.txt' " + System.IO.Path.GetFullPath("file.txt"));