您当前的位置: 首页 >  c#

苍狼王unity学院

暂无认证

  • 2浏览

    0关注

    305博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

C#通过程序集DLL获取所有的类_补充第一篇

苍狼王unity学院 发布时间:2019-07-01 19:53:02 ,浏览量:2

static void Main(string[] args) { //从该路径中 获取指定的程序集。 Assembly ass= Assembly.LoadFile(@“C:\Users\Administrator\source\repos\C引用程序集并调用其中的方法\C引用程序集并调用其中的方法\bin\Debug\C引用程序集并调用其中的方法.dll”); Type[] tips = ass.GetTypes(); for (int i = 0; i < tips.Length; i++) { Console.WriteLine(tips[i].Name);//所有类的名字。 Console.WriteLine(tips[i].Namespace);//所有类的域名。 Console.WriteLine("=================="); } Console.ReadKey(); }

附上结果: 在这里插入图片描述

关注
打赏
1665389160
查看更多评论
立即登录/注册

微信扫码登录

0.0367s