Syntax
string Directory.GetCurrentDirectory();
Program
using System;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main()
{
string curDir = "";
curDir = Directory.GetCurrentDirectory();
Console.WriteLine("Current Directory is :\n"+curDir);
}
}
}
Output
C:\Users\Manju\Documents\Visual Studio 2010\Projects\ihelp\ConsoleApplication1\
ConsoleApplication1\bin\Debug