Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

how to get current working directory in c# form code example

Example 1: get working directory c#

var DDIR = System.IO.Directory.GetCurrentDirectory();
var WorkingDirectory = "";
int index = DDIR.IndexOf(@"\");
if (index > 0)
	WorkingDirectory = DDIR.Substring(0, index) + @"\";

Example 2: c# get script directory

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

Tags:

Csharp Example

Related

iso date to date js code example mime type hyml code example how to use a for loop in vb code example program to find largest value in given sequence of 'n' numbers code example base64 to base 10 code example save a dictionary to file python code example how to remove widget using animation flutter code example text decoration not underlined code example fetch api javascript opst code example react sweet alert 2 usage code example store images django code example sequel query language code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy