How to get the common desktop directory 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.CommonDesktopDirectory);

            Console.WriteLine(s);
        }
    }
}

/*
run:
  
C:\Users\Public\Desktop

*/

 



answered Jan 13, 2017 by avibootz

Related questions

1 answer 311 views
311 views asked Jan 13, 2017 by avibootz
1 answer 208 views
2 answers 358 views
1 answer 227 views
1 answer 287 views
2 answers 304 views
...