如何在 Windows 应用程序的 VB.NET 项目中使用 C# 类? [英] How to use C# class in VB.NET project in windows application?

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

问题描述

我想在基于 Windows 的应用程序 VB.Net 项目中使用 C# 代码文件.但是该 C# 类并未在 VB.NET 应用程序中使用.我如何执行此任务.

I wanna use the C# code file in VB.Net project Which is windows based application. But that C# class is not using in VB.NET application. How Can I perform this task.

谢谢

推荐答案

如果是 .NET 程序集,您还可以添加对可执行文件的引用.因此,只需编译您的 C# 项目并将其作为引用添加到您的 VB 项目中即可.

You can also add the reference for an executable, if it is a .NET assembly. So just compile your C# project and add it as reference into your VB project.

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

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