如何在VB.net项目中包含C#项目 [英] How to include C# project in VB.net projects

查看:315
本文介绍了如何在VB.net项目中包含C#项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我有一个用c#(windows应用程序)制作的条形码项目。现在我想在我的WPF(用VB.net)项目中使用它。



请告诉我这样做的步骤..



谢谢

Hi all

I have one barcode project made in c#(windows application).now i want to use that in my WPF (with VB.net) project .

Please tell me the steps to do that..

Thank you

推荐答案

只需将其添加到您的解决方案中:

1)在解决方案资源管理器中,右键单击您的解决方案名称

2)从下拉菜单,选择添加...现有项目...

3)浏览到项目文件,然后按打开。

4)所有你必须这样做是按照通常的方式添加对其他项目的引用。
Just add it to your solution:
1) In the Solution explorer, right click your Solution name
2) From the drop down, select "Add...Existing project..."
3) Browse to the project file, and press "open".
4) All you have to do then is add the reference to your other projects as required in teh usual way.


您好。您必须右键单击您的c#项目并且:

1-选择属性。

2 - 将输出类型从WindowsApplication更改为类库

3 - 构建它(记住在这些步骤之前将c#添加到当前项目中)

4-in当前项目(WPF与VB.Net)右键点击参考资料

5-From P rojects选项卡将你的c#windows应用程序添加到VB项目中

6 - 现在你可以使用你的c#应用程序的任何类或函数添加:

使用yourFavoriteNamespace;



我希望这可以帮到你。

祝你好运
Hi.You must Right Click on your c# project and :
1- select properties.
2-Change Output Type From WindowsApplication to Class Library
3-Build it(remember before these steps add c# to your currently project)
4-in currently project(WPF with VB.Net) right click on References
5-From Projects Tab add your c# windows application to your VB project
6-now you can use any class or function of your c# application by adding this:
Using yourFavoriteNamespace;

I hope this help you.
Good luck


这篇关于如何在VB.net项目中包含C#项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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