I create an EXE ( let's call it a.exe
), that calls a DLL (let's call it b.dll
). Inside the b.dll
there is this method
public string GetStartupPath()
{
return Application.StartupPath;
}
I put the a.exe
in C:\Program Files\My Company\My App
folder. I install the b.dll
in the GAC.
Now my question is, if I launch C:\Program Files\My Company\My App\a.exe
, what will the method GetStartupPath()
in b.dll
returns?
I can do a simple sample to test, but I still decide to post this question here. Two reasons:
From the official docs:
Gets the path for the executable file that started the application, not including the executable name.
https://msdn.microsoft.com/en-us/library/system.windows.forms.application.startuppath(v=vs.110).aspx
So this means to me that it will give you the path where the exe lives.