Change current directory to c:/ in CSharp
Description
The following code shows how to change current directory to c:/.
Example
/*from w ww . j a va2 s . c o m*/
using System;
using System.IO;
static class MainClass
{
static void Main()
{
Directory.SetCurrentDirectory(@"c:\");
Console.WriteLine("Using: " + Directory.GetCurrentDirectory());
}
}
The code above generates the following result.