Get the current Directory

Knowledge Base Entry: #39
^Top
<< Back
Mobile-Menu










Get the current Directory
Category: C-Sharp/Snippets
Author: Bugfish
Created at: 2020-08-25 19:25:09
Modified at: 2025-09-19 20:57:08
Directs Hits: 748

 Here the code to get the current Directory!

string path = Directory.GetCurrentDirectory();


See more detailed Info here:
https://docs.microsoft.com/de-de/dotnet/api/system.io.directory.getcurrentdirectory?view=netcore-3.1

Caution: I do not guarantee the reliability of the information given here, the code described on this page is executed at your own risk and in the event of damage or other unforeseeable consequences I am in no way responsible or liable.
This Website is using Session Cookies for Site Functionality.