Reputation: 77
For example I have a console application named "myconsole.exe" which path is C:\temp\app\myconsole.exe
I added "C:\temp\app" to the PATH environment variable, Now I open the command prompt, type CD C:\MyProjects
and run myconsole
, how can I get the path "C:\MyProjects" in myconsole.exe?
Upvotes: 0
Views: 477
Reputation: 2438
Directory.GetCurrentDirectory method is what you are looking for.
Upvotes: 2