2013年1月16日

[转]利用C#的反射机制动态调用DLL类库

摘要: 1、使用Assembly类定义和加载程序集,加载在程序集清单中列出模块,以及从此程序集中查找类型并创建该类型的实例。2、使用MethodInfo了解方法的名称、返回类型、参数、访问修饰符(如pulic 或private)和实现详细信息(如abstract或virtual)等。使用Type的GetMethods或GetMethod方法来调用特定的方法。一、创建用于反射调用的DLL View Code using System;using System.Collections.Generic;using System.Text;namespace RefDll{ /// <summary&g 阅读全文

posted @ 2013-01-16 19:51 binbr 阅读(204) 评论(0) 推荐(0)

导航