从C#去VB.NET - 资源?资源、VB、NET

2023-09-05 02:00:04 作者:Silent(无言)

虽然我已经使用Visual Basic过去(VB 4,5和6),自从.NET框架是首次发布,我一直在C#中工作过。对于即将到来的项目,我被要求在VB.NET工作,所以我想拿出速度与VB.NET。任何人都可以推荐有针对性的对C#开发人员的任何资源(书籍,文章等)谁正在寻找快速熟悉VB.NET?

Though I have worked with Visual Basic in the past (VB 4, 5, and 6), ever since the .NET framework was first released I have been working in C#. For an upcoming project I am being asked to work in VB.NET so I am trying to come up to speed with VB.NET. Can anyone recommend any resources (books, articles, etc ..) targeted towards C# developers who are looking to quickly become familiar with VB.NET?

编辑:我觉得我应该强调的是,由于某些意见,那我不是要比较各语言的各种价值(C#与VB.NET)。这样的比较沃尔德是主观的在很多方面。相反,我是说我本人不是那个熟悉VB.NET和正在寻找资源,这将使我学习VB.NET考虑我的经验是用C#。

I feel I should emphasize, due to certain comments, that I am not trying to compare the various worth of each language (C# vs. VB.NET). Such a comparison wold be subjective in so many ways. Rather, I am saying I myself am not that versed in VB.NET and am looking for resources that would enable me to learn VB.NET considering my experience is with C#.

推荐答案

只是潜水,真的,这是最好的学习方式。从功能上看,他们大多是相同的,这些天。

Just dive in. Seriously, that is the best way to learn. Functionally, they are mostly the same these days.

对于我来说,主要的区别是

For me, the major differences are

在缺乏支持迭代器(收益率回报)在VB.Net(即将在未来的版本) 在VB.Net XML文本都没有在C#中使用。作为一个C#开发人员,很多时候我与XML的这些天,当preFER VB ... 在LINQ查询语法,表现不同VB(丰富的VB中一见钟情,但要在C#中更一致) lack of support for iterators (yield return) in VB.Net (coming in the next version) XML literals in VB.Net are not available in C#. As a C# developer, many times I prefer VB when working with XML these days... linq query syntax behaves differently in VB (richer at first sight in VB, but much more consistent in C#)

除此之外,它大多只是语法

Other than that, it's mostly just syntax

哦,别忘了把选项严格和Option推断的......如果您需要动态,你可以'排序'得到同样的转动关闭选项严格(我建议在文件级别这样做)。

Oh, and don't forget to put Option Strict and Option Infer on... If you need dynamic, you can 'sort of' get the same by turning off Option Strict (I recommend doing this at the file level).