开发者

C# dll can be used in C++/CLI project easily?

I have one C++/CLI project, a GUI applic开发者_JAVA技巧ation, which is compiled in mixed mode (managed+unmanaged). Now I want to write a custom user control using C# and compile it to become CSharpA.dll. my question is: Can this dll be used by my C++/CLI project easily? How would I do that?


Yes. Just add a reference to it. You may find yourself wanting using namespace directives, which, like the C# using directive, will add classes in other namespaces into the search space.


You only have to compile your C# code into an assembly, and this assembly can be referenced from your C++/CLI App as any other assembly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜