简体   繁体   English

有没有一种方法可以引用和使用vb类中的C#库?

[英]Is there a way to reference and use C# libraries from a vb class?

One of my tasks for tonight is to take a logging class I made in another C# project and implement it in one of their vb projects. 今晚我的任务之一是接受另一个C#项目中创建的日志记录类,并在他们的vb项目中实现它。 I have never touched vb and so am wondering if there is a way to possibly keep referencing my logging class which is in our enterprise library in C# or do I literally have to port it over as a separate vb class? 我从没接触过vb,所以想知道是否有一种方法可以继续引用C#企业库中的日志记录类,或者我真的必须将其移植为单独的vb类吗?

Once any .NET project is compiled, it doesn't matter whether it's source was VB or C#. 编译任何.NET项目后,无论其源是VB还是C#都无关紧要。 They can be used by any .NET project as a referenced assembly, be it C#, VB, J#, Managed C++, etc. 它们可以被任何.NET项目用作参考程序集,无论是C#,VB,J#,托管C ++等。

Regardless of the source language, it's all compiled into the same IL code. 不管源语言如何,它们都被编译成相同的IL代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM