如何在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: