Let's say I have a file path of:
C:\Users\my_name\Desktop\my_project\bin\debug\my_project.exe
How can I get the following file path to use in an OpenFileDialog
?
C:\Users\my_name\Desktop\my_project\
EDIT:
I've tried the following..
var path = Directory.GetParent(Directory.GetCurrentDirectory()).Parent?.ToString();
var path = Assembly.GetExecutingAssembly().CodeBase;
But both return incorrect values.