best_RD
2017-12-06 08:32c# CSarpCodeProvider 动态编译生成类后,用反射调用目标发生异常
40动态生成的类如下:
using System;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
namespace Testtoolproject
{
public class DynamicClass
{
[DllImport("Win32MutlOld(极致汇仪1).dll", EntryPoint = "Mutil", CallingConvention = CallingConvention.Cdecl)]
public static extern double Mutil(double x, double y);
}
}
错误提示如下:
- 点赞
- 回答
- 收藏
- 复制链接分享
3条回答
为你推荐
- C#调用jar包,出现“类型初始值设定项引发异常”
- visual studio
- c#
- jar
- asp.net
- 4个回答
- C#如何取动态生成的控件name属性,急急急...
- c语言
- 开发语言
- c++
- 3个回答
- 托管C++类如何反射调用C# DLL
- c++
- c#
- 1个回答
- C#注册成COM后,C++中调用,CoCreateInstance返回Class not registered
- c++
- c#
- visual studio
- 1个回答
- C++调用C#接口,在gcnew C#类对象时,程序Crash
- c++
- 1个回答
换一换