如何在C#项目中使用VB.NET控件? [英] How to use VB.NET control in C# project?

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

问题描述

如何在C#项目中使用VB.NET控件?

How to use VB.NET control in C# project?

推荐答案

为用户控件创建一个dll,并将其引用添加到C#项目中.然后,您可以创建它的对象并使用它.

如果两个项目都在同一解决方案中,则可以直接在C#项目中添加对VB项目的引用并使用控件.
Create a dll for your user control and add a reference of that in your C# project. Then you can create an object of it and use it.

If both projects are in same solution, you can directly add reference to the VB project in C# project and use the control.


d @ nish所说的...

(内容必须至少包含30个字符?这使得无法键入"google"并不能使用它.)
What d@nish said...

(Content must be at least 30 characters? That makes it impossible to type "google" and be done with it.)


.NET中没有特定于该语言的控件.如果它是Windows应用程序,则可以引用在VB中找到的每个控件.

只需在C#应用程序中添加对dll的引用(如果是自定义/或从GAC)并使用它即可.

:rose:
There are no control which is specific to a language in .NET. If it is windows application, you can reference every control that you find in VB.

Just add reference to the dll in C# application(if it is custom / or from GAC) and use it.

:rose:


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

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