Languages
[Edit]
EN

C# / .NET - get current working directory

14 points
Created by:
Root-ssh
68440

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

Directory.GetCurrentDirectory method example

string  directory = Directory.GetCurrentDirectory();

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

Output:

Current working directory: C:\Users\myuser\source\repos\Test\bin\Debug\netcoreapp2.1

References

  1. Directory.GetCurrentDirectory Method - Microsoft Docs
Native Advertising
50 000 ad impressions - 449$
🚀
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

❤️💻 🙂

Join