How to get the absolute path for the specified path string in C#

1 Answer

0 votes
using System;
using System.IO;

public class Program
{
    public static void Main()
    {
        var path = ".";

        var fullPath = Path.GetFullPath(path);

        Console.WriteLine(fullPath);
    }
}




/*
run:

/home

*/

 



answered Jul 13, 2023 by avibootz

Related questions

1 answer 321 views
1 answer 266 views
266 views asked Mar 10, 2017 by avibootz
3 answers 416 views
2 answers 313 views
1 answer 290 views
3 answers 965 views
...