.net语言如何组合在一起? [英] how composite .net languages together?

查看:120
本文介绍了.net语言如何组合在一起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以在Visual Studio中编写不同的.net语言,但是如何?
我们有一个包含C ++ CLR(托管C ++)和C#表单的项目.
我们如何构成这种形式?以及我们如何编写不同的.net语言代码?
tanks

i know that i can compose different .net language in visual studio but how?
we have a project that contain C++ CLR ( managed C++ ) and C# forms .
how we compose this forms? and how we compose different .net languages code?
tanks

推荐答案

您可以混合使用不同语言的程序集,但不能在同一.Net程序集中使用两种不同的语言.因此,如果您有一些用C#编写的表单,请将这些表单放入自己的项目(一个类库)中,对于C ++和VB同样适用.

就像我说的那样,您可以在项目中为任何.Net程序集添加引用,甚至还可以包括其他可执行文件.
You can mix assemblies that use different languages, but you can''t use two different languages in the same .Net assembly. So, if you have some forms written in C#, put those forms into their own project (a class library), and the same thing goes for C++, and VB.

Like I said, you can add a reference in your project to ANY .Net assembly, and this even includes other executables.


这篇关于.net语言如何组合在一起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆