如何调用在C#中的Visual Basic 6.0的方法?
问题描述:
我想调用它从C#(Visual Studio 2008中)用Visual Basic 6.0的方法。是否可以?我会怎么做呢?
I would like to call a method which is written in visual basic 6.0 from c# (visual studio 2008). Is it possible? How would I do it?
答
要做到这一点是刚刚编译VB6代码的ActiveX DLL最简单的方法。
然后你就可以在你的.NET项目中引用的DLL。 (Visual Studio中可以参考的ActiveX DLL文件正确。)
Easiest way to do it is to just compile the VB6 code as an ActiveX DLL. Then you can reference the DLL in your .net project. (Visual studio can reference ActiveX DLLs properly.)