user123 user123 - 5 months ago 28
C# Question

How can i get current application folder path in c# windows application

I created one folder like

to my application and how can i get that folder.

I took below code

string pathname = System.Environment.CurrentDirectory(Application.ExecutablePath);

by using the above code i am getting with

I need to get my folder name

Please help me out.

Thank you


if the DownloadFile folder is in the main folder of you project you can "go up" 2 folders from "bin\debug" and "go into" DownloadFile.