Migrating from C # to VB.NET - Resources?

Although I worked with Visual Basic in the past (VB 4, 5, and 6), since the .NET platform was open, I have been working in C #. For the upcoming project, I am asked to work on VB.NET, so I try to speed up with VB.NET. Can anyone recommend any resources (books, articles, etc.) aimed at C # developers who want to get to know VB.NET quickly?

EDIT: I feel that I have to emphasize due to some comments that I am not trying to compare the different values ​​of each language (C # vs. VB.NET). Such a comparison was subjective in many ways. Rather, I say that I am not so versed in VB.NET and looking for resources that would allow me to learn VB.NET, given that my experience is related to C #.

+3
source share
7 answers

Just immerse yourself. Seriously, this is the best way to find out. Functionally, they are basically the same these days.

For me, the main differences

  • lack of iterator support ( yield return) in VB.Net (in the next version)
  • XML literals in VB.Net are not available in C #. As a C # developer, I prefer VB many times when working with XML these days ...
  • The linq query syntax behaves differently in VB (richer at first glance in VB, but much more consistent in C #)

Other than that, basically it's just the syntax

Oh, and don't forget to put Option Strict and Option Infer on ... If you need to dynamic, you can "sort" it by disabling Option Strict (I recommend doing this in the file level).

+4
source
+11
+4

, # VB6, ( #, ++, VB6, VB.Net).

, , , , . , , , .NET Framework, , , , .

+2

Google is good for checking syntax differences (search for "cb keyword equivalent in vb.net"). MSDN is well versed in code examples in both VB and C #.

This online converter tool may also be useful.

+1
source

Other than short-circuit statements, one thing that can disable you is not initializing your variables. It doesn't seem like you need to, but if you are in a loop, you really need to.

0
source

Source: https://habr.com/ru/post/1780950/


All Articles