How to get the common program files 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.CommonProgramFiles);

            Console.WriteLine(s);
        }
    }
}

/*
run:
  
C:\Program Files (x86)\Common Files

*/

 



answered Jan 14, 2017 by avibootz

Related questions

1 answer 347 views
1 answer 294 views
1 answer 729 views
1 answer 209 views
209 views asked Jan 14, 2017 by avibootz
1 answer 212 views
212 views asked Jan 14, 2017 by avibootz
1 answer 246 views
246 views asked Jan 14, 2017 by avibootz
1 answer 237 views
237 views asked Jan 14, 2017 by avibootz
...