How to combine three paths in C#

1 Answer

0 votes
using System;
using System.IO;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string path = Path.Combine("d:\\", "programming", "data.txt");

            Console.WriteLine(path);
        }
    }
}


/*
run:

d:\programming\data.txt

*/

 



answered Mar 9, 2017 by avibootz

Related questions

1 answer 156 views
156 views asked Mar 9, 2017 by avibootz
1 answer 143 views
143 views asked Mar 9, 2017 by avibootz
2 answers 132 views
1 answer 154 views
1 answer 211 views
...