c# - .NET、C#、反射 GetMethod 返回 null(试图在第三方 dll 中获取方法)
问题描述
我正在尝试创建一个实例并在 DLL 中调用一个方法,但由于某种原因GetMethod
返回null
. 谁能告诉我这里有什么问题?
//this works fine
Type myDllType = Type.GetTypeFromProgID("Application.name");
//this works fine too
object dllInstance = Activator.CreateInstance(myDllType);
//this returns null, I am 100% sure "methodmd" exists
MethodInfo methodCommand = myDllType.GetMethod("methodmd");
解决方案
推荐阅读
- javascript - jquery addClass 不会立即生效
- linux - 在 SLURM 中传递一个字符串参数来命名一个作业
- javascript - 使用 Node.js 的流写入和读取大型数组
- html - 将鼠标悬停在 HTML 上,元素下划线闪烁白色然后淡入红色
- python-3.x - 收到类似 ModuleNotFoundError: No module named 'tesserocr' 的错误
- python - 在字符串列表中查找和替换字符串值 - “转换”函数
- firebase - 仅使用密码进行身份验证
- ruby-on-rails - ActionView::Template::Error(资产“*.css”不在资产管道中。):
- firebase - 在应用内浏览器中启动 url 时,flutter 是否有可能获取浏览器 url?
- highcharts - Highchart: x- highchart 根据按钮动态改变 dateTime LabelFormats(hours,day,week,month,qtr,year)