Help us understand the problem. What is going on with this article?

デスクトップ等の特殊ディレクトリのパスを取得する

More than 5 years have passed since last update.

よく忘れるのでメモ。

デスクトップ等の特殊ディレクトリのパスを取得するには System.Environment.GetFolderPath() メソッドを使います。

SampleGetFolderPath.cs
using System;

string desktopDirectoryPath =
 Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);

参考

rohinomiya
VIM / C#.net / AutoHotKey / Ruby / VB.net Windowsから最近Macに乗り換え、色々と戸惑うばかり。
http://rohinomiya.posterous.com/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away