I know that in the same directory where my code runs, there are some files. I need to find them and move on to another method:
MyLib.dll
Target1.dll
Target2.dll
Foo(new[] { "..\\..\\Target1.dll", "..\\..\\Target2.dll" });
Therefore, I call System.IO.Directory.GetFiles(path, "*.dll"). But now I need to find out the path:
string path = new FileInfo((Assembly.GetExecutingAssembly().Location)).Directory.FullName)
but is there a shorter way?
source
share