How do you get the relative path to AppDomain.CurrentDomain.BaseDirectory into a Uri.
I need to step up "cd ......" from the AppDomain.CurrentDomain.BaseDirectory and then down to other folders.
Do you know how?
Thanks in advance
Regards
If you just want to step up one ore more folders and then down, you could use something like this.
To get a file two folders up:
AppDomain.CurrentDomain.BaseDirectory+"..\\..\\Program.cs"
To get a file two folders up and one down:
AppDomain.CurrentDomain.BaseDirectory + "..\\..\\Properties\\AssemblyInfo.cs"
If you just want the path you could do something like this:
Path.GetFullPath(AppDomain.CurrentDomain.BaseDirectory + "..\\..\\Properties\\");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With