tags:

views:

140

answers:

3

Also, if they are so similar then why do they exist separately ?

+6  A: 

Some people prefer a c like curly brace syntax, others a more English like syntax like in VB.net And since MS wants VB programmers to upgrade to .net they need to offer a VB.net, and since they want to attract Java and C/C++ programmers they need to offer C#.

C#
Do what I say

  • Syntax similar to Java C/C++
  • Case sensitive
  • Fewer implicit conversions (=> more casts)
  • Allows unsafe code(pointers)

VB
Do what I mean

  • English like syntax
  • Case insensitive
  • Weaker Typing (more implicit conversions)
CodeInChaos
So it is a marketing strategum
wil
It's catering to different audiences while offering a compatible platform. And most programmers have preferred languages, and .net is designed to make different programming languages inter-operable.
CodeInChaos
A: 

VB.NET and C# all compile down to the same (or nearly the same, for those of you who care to point out the difference) code. You use the same .NET platform... the same classes and what not for both. You can translate code from one to the other, as just the language syntax and structure is different.

(Generally speaking of course!)

Brad
+1  A: 

They exist separately as descendant from two very different programing paradigms. VB comes from the interpreted background VB has more of the feel of this family of languages. VB and c# have converged over there life time as useful syntax features have been incorporated from each. However there are still some reel differences.

C# can still utilize unsafe blocks allowing it direct access to pointers something not support by Vb.

C# has a more exacting syntax as well while VB can even be set to have automatic varable declaration.

rerun