Languages
[Edit]
EN

C# / .NET - get current working directory

14 points
Created by:
Root-ssh
94330

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
­čÜÇ
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