Get Path to desktop Path - CSharp File IO

CSharp examples for File IO:Path

Description

Get Path to desktop Path

Demo Code

using System;//  w ww .j av a  2  s.c  om
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
   static void Main(string[] args)
   {
      // Finding path to the desktop
      string pathToDesktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
      // Output
      Console.WriteLine("Path to your desktop: " + pathToDesktop);
   }
}

Result


Related Tutorials