view plaincopy to clipboardprint? using System; using System.Reflection; namespace Magci.Test.Reflection { public class TestAssembly { public static void Main() { //将程序集加载到运行过程中 Assembly ass = Assembly.Load("TestCustomAttributes"); Assembly ass1 = Assembly.LoadFrom(@"E:CODEdotNetC#9-ReflectionTestCustomAttributes.dll"); //获取程序集显示名称 Console.WriteLine(ass1.FullName); //获取程序集中定义的类型 Type[] types = ass.GetTypes(); foreach (Type t in types) { Console.WriteLine(t.FullName); }