How to get the Application Directory in C#?
If you have been developing application using C#, I am sure you would have come across a situation where you have to find the Application Directory Path.
There are many ways to get the Application Directory in your C# Application. I have listed below some of the ways you can accomplish this.
Here is an example of how you can get the Application Directory Name where you have your EXE.
This takes the Path of the EXE of your application and passes it to the GetDirectoryName method to get the name of the directory.
Next to get the Directory name of the Executing Assembly you can use the following code:
Here is an example of getting the Directory Name of the Executing Assembly.
You can use this code in your C# Windows Application to get the Application Directory Name
Hope this was helpful.