我需要在我的应用程序根目录中获取所有dll.最好的方法是什么?
string root = Application.StartupPath;
Run Code Online (Sandbox Code Playgroud)
要么,
string root = new FileInfo(Assembly.GetExecutingAssembly().Location).FullName;
Run Code Online (Sandbox Code Playgroud)
在那之后,
Directory.GetFiles(root, "*.dll");
Run Code Online (Sandbox Code Playgroud)
哪种方式更好?还有更好的方法吗?