r/dotnet • • Feb 12 '19

An Exhausting List of Differences Between VB.NET & C#

https://anthonydgreen.net/2019/02/12/exhausting-list-of-differences-between-vb-net-c/
15 Upvotes

4 comments sorted by

2

u/Apk07 Feb 13 '19

Well he doesn't really paint VB as bad, just that it's syntax and flow is more different from C# than a lot of people claim

2

u/Zardotab Feb 14 '19

Most of it is just personal preference. Personally I like how the type-name is on the right of variable name in VB. Without syntax coloring from an IDE, it's hard to spot the variable name in C# inside a big list of declarations.

The self-matching of block enders is also nicer in VB. With C# the square brackets are easier for your eyes and the IDE to mix up because they are all the same. VB gives the compiler more clues about nesting intent, making for better localization of problem flagging.

Wrapping a line is easier in C#, but arguably too much wrapping is a sign of poor coding. Most statements should be no more than about 100 characters.

1

u/SteelAvalon Feb 14 '19

Huh. I always saw VB.NET as a vestigial language, but now I can kinda see why it's still around. Neat!