Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 C# 代码上使用 Visual Basic 库是否不正确或不受欢迎?
一个特殊的例子是 CSV 解析器,它存在于 VB 但不存在于 C#。将 Microsoft.VisualBasic.FileIO 用于 TextFieldParser
我相信还有其他例子。当然,在 C# 中也有同样的方法,但需要编写更多代码,为什么要重新发明轮子呢?
.NET的全部意义(嗯,一个重点)是用什么语言编写的并不重要!所以从 C# 调用 VB 库没什么大不了的。
TextFieldParser从 C# 中使用是完全安全和合理的。它是默认框架安装的一部分。用它!
TextFieldParser
“为什么要重新发明轮子?” - 确切地!