Languages
[Edit]
EN

C# / .NET - get current working directory

14 points
Created by:
Root-ssh
150970

In C# / .NET it is possible to get current working directory path in the following way:

Practical example

string  directory = Directory.GetCurrentDirectory();

Console.WriteLine("Current working directory: " + directory);

Output:

Current working directory: C:\Project\Test\bin\Debug

 

References

  1. Directory.GetCurrentDirectory Method - Microsoft Docs
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join