How easy is it to learn VB compared to C#?

  • Thread starter Thread starter Andy B
  • Start date Start date
It's harder to learn VB well.
This is due to the fact that VB offers more ways of doing most things.
e.g.,
Setting the return value for a function - 2 ways (C# has 1 way)
Wiring events to methods - 2 ways (C# has 1 way)
String manipulation - 2 ways (VB 'legacy' functions vs .NET methods)
Exception handling vs unstructured error handling (C# has 1 way)

These are just examples - I could list a few dozen areas where VB offers
multiple alternatives, sometimes based on a need to maintain legacy code.

VB also has a few features not available in C# (such as XML literals and
optional parameters), but C# also has some features not available in VB
(unsafe code, anonymous methods, and iterators), so these kind of wash out.
--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
VB to Java
Java to VB & C#
Instant C#: VB to C#
Instant VB: C# to VB
Instant C++: VB, C#, or Java to C++/CLI
 
Andy,

Depends on what you want to learn

Programming: use C# as it is more strict with everything and does not
automaticly change your typing mistakes,

Learn to use a language to be productive: use VB as it does things that are
time spending to do with C# in many cases in a more easy way.

Just my opinion.

Cor
 
Andy,

Depends on what you want to learn

Programming: use C# as it is more strict with everything and does not
automaticly change your typing mistakes,

Learn to use a language to be productive: use VB as it does things that are
time spending to do with C# in many cases in a more easy way.

Just my opinion.

Cor

I agree, C# is much more strict in the way it enforces rules. I would
say it would be very beneficial for new programmers to use C# and get
a hold on how things should work and prevent many "stupid" mistakes
(like implicitly returning value types and dumb casting errors).
However, once you have a firm grasp on how to program, I feel VB
(especially in VS 2008's IDE) makes it much, much easier to crank out
code. It just seems to flow better and is much more natural to write.

Thanks,

Seth Rowe [MVP]
 
What should you base the choice of what one to use off of? It's hard for me
since I know a lot of c# but VB looks like plain old english sentence
fragments to me and seems like it would be easier to understand than c#.
 
I think I might give it a try and see how it turns out. Looks like I will be
around for a little while ...:)
 
I agree, C# is much more strict in the way it enforces rules. I would
say it would be very beneficial for new programmers to use C# and get
a hold on how things should work and prevent many "stupid" mistakes
(like implicitly returning value types and dumb casting errors).
However, once you have a firm grasp on how to program, I feel VB
(especially in VS 2008's IDE) makes it much, much easier to crank out
code. It just seems to flow better and is much more natural to write.

Thanks,

Seth Rowe [MVP]

I disagree. I think since vs2005, the C# editor is much more friendly.
Even the autoimplement stuff seems to be a little bit nicer in C#.

That's my opinion of course... The guy that LIKES case sensitivity.
 
Speaking as someone who knows both fairly well and has worked in both
a VB and C# environment I can say this. VB is generally easier to
learn, the syntax is fluid for someone that doesn't want to learn a
lot of technical terms. On the other hand C# isn't necessarily hard
to learn, but it's strictness forces you to write stronger code. In
all reality if you code VB without using the built in functions and
with Option Strict on you'll be able to move between the two rather
easily.
 
I agree with cfps.Christian,

But honestly it shouldn't matter too much which you start with.

It's a matter of taste.

Go seach for some code witten in each, and see how easy *you* find each to
read.
 
Barely - only if you consider 'unsafe' code. Other than unsafe code (used by
a very small fraction of C# developers), I don't see how VB is higher level.
You might be thinking of C.
--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
VB to Java
Java to VB & C#
Instant C#: VB to C#
Instant VB: C# to VB
Instant C++: VB, C#, or Java to C++/CLI
 
How hard/easy is it to use/learn VB compared to c#?

In my opinion definately VB.NET rocks when compared to C#. There are
easier (sure, almost every language has difficulties to learn of
course like VB, but that's comparison with C#) and shorter ways to do
the same thing in VB with less error-risk, especially because of not
being case-sensitive, however both languages have some differences, no
need to extend with these differences which are available and can be
googled easily through the net.

However, in my opinion, also not tested 2008 yet, VB 2005 IDE is much
more developer friendly when compared to VC# 2005. Background
compiler(real-time compiler in design mode) of VB 2005 brilliantly
more accurate than C# IDE. In VC# 2005, you have to wait much longer
to see if there are coding errors in error list at the bottom of the
screen even for a semicolon mistake, plus you have to "build" your
project for once if there are additional errors to be reported in
error list, before starting debugging. In VB 2005 IDE i haven't had
such problems, almost never. And also typing performance intellisense
is a bit slower in C# than in VB on the same PC.

Just my thoughts,

Regards,

Onur Güzel
 
Frankly I like both. Some on our team pick VB, some pick c#. Those that
pick c# tend to have tasted java or c in their past. Maybe that makes an
easier migration. At least it should.

Out of curriosity, why didn't you crosspost to the c# group?
 
Hello Family,
Frankly I like both. Some on our team pick VB, some pick c#. Those
that pick c# tend to have tasted java or c in their past. Maybe that
makes an easier migration. At least it should.

If we could create MultiLanguage projects, then this problem would go away.

http://rorybecker.blogspot.com/2006/09/i-want-multi-language-projects-in.html

The need to create a new project and therefore a new dll is massive overkill
just to be able to use the features of another language.
Out of curriosity, why didn't you crosspost to the c# group?

Probably didn't want to start a(nother) religious war :)
 
Tom,

That's my opinion of course... The guy that LIKES case sensitivity.
Have a look at VB, there it is automaticly set in the right case.

Kidding of course.

:-)

Cor
 
That's an interesting concept in your blog. We've been happy
compartmentalizing our dlls fairly well (I hope...).

I wouldn't recommend taking too far though. I could imagine someone wanting
the next logical step, the following:

#region "Language=c#"
string message;
int index;
#end region

#region "Language=vb"
for index = 1 to 5 step 2
message = message & index.ToString()
next
#end region
 
Hello Family,


If we could create MultiLanguage projects, then this problem would go away.

http://rorybecker.blogspot.com/2006/09/i-want-multi-language-projects-in.html

The need to create a new project and therefore a new dll is massive overkill
just to be able to use the features of another language.


Probably didn't want to start a(nother) religious war :)

Rory,

I'm sure you know, it is technically possible to create multi-language
assemblies - there just is no support in the ide. You have to compile
from the command line to accomplish it.

The problem is that, I just don't really see the point of it. There
have been precious few times when I have wanted to mix languages, and
solution level support was more then adequate. The only time, that I
can really think of is using VB.NET for office automation, simply
because it is much easier and cleaner to use VB.NET for late-bound
scenarios - though, it looks as if that might change in C# v4.

I just don't see this as a feature that many developers will be
clamoring for.
 
I am already somewhat experienced in C#. I have been using it for about 2 or
so years now and feel that I would have enough background to base a VB
comparison on. I haven't messed with VB though, and have no idea about its
learning curve. I didn't cross post either, because of reasons that I don't
think is right to say on a public list other than that whenever I post
there, I get harrassed with the idea that my posts and/or questions are too
vague and never do reach the point of "intellegence" or "accuracy". Guess
they are too lame to post overthere for some reason. Sorry for the short
lived vent, will get off my soap box now...
 
Then I suspect you will have an easy time migrating to VB.Net. As others
have said, just turn on Option Strict. I think it helps everyone avoid
common mistakes.
 
Rory,

I'm sure you know, it is technically possible to create multi-language
assemblies - there just is no support in the ide. You have to compile
from the command line to accomplish it.

The problem is that, I just don't really see the point of it. There
have been precious few times when I have wanted to mix languages, and
solution level support was more then adequate. The only time, that I
can really think of is using VB.NET for office automation, simply
because it is much easier and cleaner to use VB.NET for late-bound
scenarios - though, it looks as if that might change in C# v4.

I just don't see this as a feature that many developers will be
clamoring for.

I write mainly in VB.Net, but sometimes I just need to use
those darn unsafe pointers (for just a few functions) and
there is no substitute (that I know of) for those in VB.Net
so I have to create a separate project/dll and use ILMerge
in a post-compilation step if I do not want to distribute yet
another dll :(

/Joergen Bech
 
Back
Top