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 205 views
1 answer 177 views
177 views asked Mar 10, 2017 by avibootz
3 answers 278 views
2 answers 213 views
1 answer 200 views
3 answers 759 views
...