What are the most important functional differences between C# and VB.NET?

Question!

Certainly there's the difference in general syntax, but what other critical distinctions exist? There are some differences, right?

By : Larsenal


Answers

The linked comparisons are very thorough, but as far as the main differences I would note the following:

  • C# has anonymous methodsVB has these now, too
  • C# has the yield keyword (iterator blocks)VB11 added this
  • VB supports implicit late binding (C# has explicit late binding now via the dynamic keyword)
  • VB supports XML literals
  • VB is case insensitive
  • More out-of-the-box code snippets for VB
  • More out-of-the-box refactoring tools for C#Visual Studio 2015 now provides the same refactoring tools for both VB and C#.

In general the things MS focuses on for each vary, because the two languages are targeted at very different audiences. This blog post has a good summary of the target audiences. It is probably a good idea to determine which audience you are in, because it will determine what kind of tools you'll get from Microsoft.

By : Luke


This topic is briefly described at wikipedia and harding.

http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Visual_Basic_.NET http://www.harding.edu/fmccown/vbnet_csharp_comparison.html

Just go through and make your notes on that.



Yes VB.NET fixed most of the VB6 problems and made it a proper OOP language - ie. Similar in abilities to C#. AlthougnI tend to prefer C#, I do find the old VB ON ERROR construct useful for handling COM interop timeouts. Something to use wisely though - ON ERROR is easily abused!!

By : winwaed


This video can help you solving your question :)
By: admin