How to get the Windows path in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Environment.GetFolderPath(Environment.SpecialFolder.Windows);

            Console.WriteLine(s);
        }
    }
}

/*
run:
  
C:\Windows

*/

 



answered Jan 14, 2017 by avibootz

Related questions

1 answer 166 views
166 views asked Mar 9, 2017 by avibootz
1 answer 165 views
1 answer 122 views
122 views asked Jan 24, 2017 by avibootz
1 answer 182 views
182 views asked Aug 17, 2018 by avibootz
1 answer 230 views
1 answer 145 views
...