c# and vb.net comparison

  • Thread starter Thread starter vinu
  • Start date Start date
What are the main difference between c# and vb.net.

Pretty broad question there mate ;) Here's a shortlist:

1) The syntax ;)
2) C# supports operator overloading VB doesn't yet (it will in the next
version)
3) C# allows the <NonSerialized> attribute to be applied to events. VB
doesn't (yet)
4) VB has a number of ways of handling events (Handles and AddHandler
methods)
5) VB intellisense is better in Visual Studio
6) C# supports XML documentation in the comments.
7) Most samples on the web seem to be in C# (although there are some good C#
to VB converters)

Under the hood, there should be no difference as they are both compiled into
the same Intermediate Language. Performance wise, they should be pretty much
the same.

Don't base your choice of language on the differences between them as this
will probably change when new versions are released. Instead your decision
should be based on Business Factors like:

-How long it will take to learn the language
-Your (and your team) background (C++ or VB or even Java)
-The background of those who have to support the code.


Personally, I'm a VB programmer because of my background in VB6. This isn't
stopping me from learning C# in case I need it on a future project.

Remember, knowing dotnet is 10% knowing the language and 100% knowing the
framework!

Hope this helps,

Trev.
 
Back
Top