日期:2014-05-17 浏览次数:21013 次
private static StringBuilder _resultString = new StringBuilder();
static void Main(string[] args)
{
Assembly mainExe = Assembly.LoadFrom(@"D:\DEMO测试\ConsoleApplication3\WindowsFormsApplication1\bin\Debug\1.exe");
BuildReferencesTree(mainExe, 1);
Console.WriteLine(_resultString);
Console.Read();
}
private static void BuildReferencesTree(Assembly assembly, Int32 index)
{
if (index >= 5)
{
return;
}
AssemblyName[] assemblyNames = assembly.GetReferencedAssemblies();
foreach (var item in assemblyNames)
{