[VC2005] カレントフォルダを変更する方法

◆概要

この資料は、Microsoft(R) Visual C# 2005で カレントフォルダを変更する方法について記述しています。

カレントフォルダを変更するには、Directory.SetCurrentDirectoryメソッドを利用します。

◆Sample code


using区に追加するコード
using System.IO;
フォームのコード
        private void button1_Click(object sender, EventArgs e)
        {
            //カレントフォルダを変更する
            Directory.SetCurrentDirectory("\\Windows");
        }


▼ページトップへ