Directory.getcurrentdirectory() Code Example


Example 1: c# get current directory


string currentDir = System.IO.Directory.GetCurrentDirectory();
//returns the current directory of the application when executing

Example 2: get current directory c# \


System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);

Example 3: c# get script directory


string appPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath);

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable