C# and VB.net comparison

  • Thread starter Thread starter Cyrus Chiu
  • Start date Start date
C

Cyrus Chiu

It seems using vb.net to develop window application is more efficient than
C#.
And it seems that it's more difficult to handle the events in C#. Am I
correct? Is there any comparison?
 
* "Cyrus Chiu said:
It seems using vb.net to develop window application is more efficient than
C#.
And it seems that it's more difficult to handle the events in C#. Am I
correct? Is there any comparison?

_IMO_ you are correct.
 
How exactly do you measure efficiency? Because if it is
by the amout of typing you need to do I am pretty sure C#
is more efficient.
One aspect that makes C more "usable" is the case
sensitivity which I think is great allowing me to name
the field myNiceField and the property MyNiceProperty
without using other helper characters.
I also don't think handling events is more difficult in
C#, it's only the additional step of checking if the
event is null, everything else is the same...

I believe C# is more flexible and more efficient. But as
long as you can achieve the same results in both
languages (plus others) I think that ultimately it's a
matter of personal taste...

regards,
iulian
 
I just started writing C#, i would like to know what is the advantage of C#
over vb.net in implement window form application.



How exactly do you measure efficiency? Because if it is
by the amout of typing you need to do I am pretty sure C#
is more efficient.
One aspect that makes C more "usable" is the case
sensitivity which I think is great allowing me to name
the field myNiceField and the property MyNiceProperty
without using other helper characters.
I also don't think handling events is more difficult in
C#, it's only the additional step of checking if the
event is null, everything else is the same...

I believe C# is more flexible and more efficient. But as
long as you can achieve the same results in both
languages (plus others) I think that ultimately it's a
matter of personal taste...

regards,
iulian
 
Hey.

The advantages / disadvantages are mainly in programming style and not
specifically related to windows forms programming. The main difference in
winforms programing is how events are handled ( handles... in vb.net vs +=
myeventHandler in C# - since both are taken care of by the VS environment
it's mostly irrelavant). It only matters when you're looking to do things
like handle multiple events with one function or unsubscribe to an event,
etc. and in either case it's doable, only the syntax is different (I find
C# more reasonable here).

Personally, I have found that VB requires extra typing that adds no meaning
/ no clarity to the code and have found C# to be much more enjoyable to code
in. Note that I have been a VB6 programmer for several years and have
recently worked on both C# and VB.net projects. In fact, even our web
developers (who where the most familiar/comfortable with VB) commented that
they never wanted to go back (to vb/vb.net). But again, it's just personal
opinion.

At the end of the day, it's just syntax. With VB you will type a bit more
but if you find it adds meaning (I find it adds extra filler words with no
meaning) by all means use vb.net - your code will compile to the same. Of
course, C# programmers will always be cooler :)

Brian.
 
Back
Top