如果一个项目引用添加到其他prjoct,如果两者都是不同的语言...? [英] how to one project reference add to onther prjoct if both are different language...?

查看:111
本文介绍了如果一个项目引用添加到其他prjoct,如果两者都是不同的语言...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vb.net中开发了窗口应用程序,但在c#.net中给用户报告部分我添加了c#项目但是如何调用vb.net页面去c#页面请帮帮我......... ..

i develop window application in vb.net but reporting section given to user in c# .net i added c# project it but how to call vb.net page to go c# page please help me ...........

推荐答案

就.NET而言,VB和C#是相同的:它们都被编译成IL而且它无法真正说明源代码是什么代码看起来就像那个阶段。



只需添加程序集引用,然后为VB添加使用语句命名空间并访问类,就像它们是项目的一部分一样。如果你想从VB访问C#,那么添加引用并改为使用 Includes 语句。

(但不要试图在VB中添加对C#的引用,并在C#中引用VB作为VS将引发循环引用(这将阻止构建项目)
As far as .NET is concerned, VB and C# are the same: they are both compiled into IL and it can't really tell what the source code looked like by that stage.

Just add the Assembly reference, then add a using statement for the VB namespace and access the classes as if they were part of your project. If you want to access the C# from the VB, then add the reference and use an Includes statement instead.
(But don't try to add a reference to the C# in the VB, and a reference to the VB in the C# as VS will complain of a circular reference (which would prevent building the project)


这篇关于如果一个项目引用添加到其他prjoct,如果两者都是不同的语言...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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