Should I learn...VB or C#?

robmiller said:
No it isn't :confused: C# is faster than Java but neither are as fast as well-written C++.
I'm talking about Visual Basic, not C#, although I doubt C# is faster overall than Java 5, maybe for GUI's in Windows using Windows.forms.

robmiller said:
Mono is coming on in leaps and bounds.

Maybe for C#, not for visual basic .net. Development of open source visual basic .net libraries and compiler implementation has been very slow. It has a very poor implementation of Windows.Forms, you won't be able to easily use your windows code in linux anytime soon. The legality of some parts of Mono are another issue, plus the fact that it will always be behind Microsoft's Visual Studio which is a moving target.

robmiller said:
MSDN's docs are absolutely awesome and completely free.

I wouldn't call them awesome. Free for viewing from a web browser, otherwise you need to spend hundreds of dollars for a MSDN subscription to make it nicely integrate into the development environment.

robmiller said:
What? How? Expand.

here's some explanation of the sandbox security model in Java 5:
http://www.artima.com/underthehood/overviewsecurity2.html
 
ballistic said:
I'm talking about Visual Basic, not C#, although I doubt C# is faster overall than Java 5, maybe for GUI's in Windows using Windows.forms.

Gah, slip of the tongue. Either way it's irrelevant since VB and C# both compile to the same IL.


ballistic said:
I wouldn't call them awesome. Free for viewing from a web browser, otherwise you need to spend hundreds of dollars for a MSDN subscription to make it nicely integrate into the development environment.

No you really don't - they integrate with the Express Editions free of charge, and you get the regular and dynamic help integrated.


ballistic said:
here's some explanation of the sandbox security model in Java 5:
http://www.artima.com/underthehood/overviewsecurity2.html

Cheers, I'll give it a read.
 
There really is very little to choose between C# and VB.Net, apart from syntax and its associated readability.

If you are from a procedural background (COBOL, etc. - yes, I'm showing my age), then VB.Net is the way to go and then cross-train to C#.

If you are from an OOP/C/Java background then pick C# and spend some time learning the VB.Net syntax.

If anyone tells you there are significant differences between the languages, both in terms of performance and/or functionality, they have not used both of them in any sort of anger, and is probably borne out of their vague recollections of the utter DRIBBLE that was VB6.

There's a reason that C++ is kept on in the Visual Studio, so that you can access low level memory based "stuff" with pointers and other hugely technical things that I have no desire nor need to know about.

The reason to learn both syntaxes? The key to .Net is the framework - once you understand that, coding is easy in either language - and often you'll find that third-party open source products will be coded in either language interchangeably. It also adds another feather to your cap without any real amount of effort and is nice to put on a CV.

I got my MCAD.Net in both VB.Net and C# simply by doing the C# examples and then learning the differences.
 
Mr^B said:
If you are from a procedural background (COBOL, etc. - yes, I'm showing my age), then VB.Net is the way to go and then cross-train to C#.

Probably why I choose VB.Net as I spent 5 years developing COBOL stuff for ICL :o
 
Mr^B said:
There's a reason that C++ is kept on in the Visual Studio, so that you can access low level memory based "stuff" with pointers and other hugely technical things that I have no desire nor need to know about.
Another reason is that there are some industries such as games that use C++ almost exclusively for their engines for the reasons you mention. MS wouldn't want to lose their custom by dropping support for C++.
 
Sparky191 said:
When I was learning Java one of my college lecturer introduced it by saying VB is not a real language its creating using wizards and doesn't involve programming. Thats a moronic comment and all it demonstrates is that the speaker is very narrow minded and probably has very little real world business experience.
Exactly. It's theory vs practice isn't it. The company I'm currently working for makes a vast proportion of it's profit on the back of VB6 apps which work perfectly well and are easy to maintain and deploy etc. They could spend a fortune rewriting them all in C# to make them perhaps more ideologically sound or whatever, but where is the business sense in that?
 
Nothing wrong with vb, its great for office environments and great in combinations with other languages to create applications very quickly.

Just be prepared for c#, just because you say your doing c# doesnt mean your gonna be good at it or gonna pass it, you need to think carefully if you can dedicate the extra time needed to learn it, especially if you have never really coded before. I could have told you everyone in here would have said c# aswell. People just say c# for the sake of c#, even if they dont have any programming background, they say it because they hear its "ultra leet haxxor gamez programming leet hax hax" etc i.e. hype.

You have internet access, so i would read up on the benefits and the end use of c#. I would also think about whether it will be useful to you in the future and whether you will be able to make use of it if you do pass your degree and get a job.
 
I started with VB.NET (asp.net) and plan to start learning C# now aswell since both are used a lot in office environments like Teknodeamon said.
so I guess my answer to the OT is learn both :) - start with one then get to know the other when you feel ready.
Twice the career options!
 
5tephen said:
What is Windows itself written in?
Mainly C++ I think, but I could well be wrong.

Teknodeamon said:
Nothing wrong with vb, its great for office environments and great in combinations with other languages to create applications very quickly.

Just be prepared for c#, just because you say your doing c# doesnt mean your gonna be good at it or gonna pass it, you need to think carefully if you can dedicate the extra time needed to learn it, especially if you have never really coded before. I could have told you everyone in here would have said c# aswell. People just say c# for the sake of c#, even if they dont have any programming background, they say it because they hear its "ultra leet haxxor gamez programming leet hax hax" etc i.e. hype.

You have internet access, so i would read up on the benefits and the end use of c#. I would also think about whether it will be useful to you in the future and whether you will be able to make use of it if you do pass your degree and get a job.
I'd agree with you there. Although I would recommend C# as a language to start off in if you're new to programming, I agree that a lot of people just shout C#!!! out of hype.
 
When I used to do VB/VBA I was surprised at the number of contracts I got to replace Java and C++ apps with simplier VB or even VBA apps that would be easier to maintain and developer further. Written properly VB/VBA apps can be very robust. However for someone starting out, or choosing a college course, theres no need to go back to VB or even VB.net. C# AND Java is what you should be doing. IMO anyway.
 
Sparky191 said:
When I used to do VB/VBA I was surprised at the number of contracts I got to replace Java and C++ apps with simplier VB or even VBA apps that would be easier to maintain and developer further. Written properly VB/VBA apps can be very robust. However for someone starting out, or choosing a college course, theres no need to go back to VB or even VB.net. C# AND Java is what you should be doing. IMO anyway.
No real need to do both C# and Java, as they're so similar. If you can use one, you only need to learn the libraries in order to use the other :)
 
For learning I think C# is better for readability alone.
One of many, many examples - declaring a variable:
Dim thisSum As Integer
int thisSum;

Not a very good example I guess. It just takes so fewer words to do practically all common tasks, and when you compare an identical program written in both VB.NET and C#, you have to agree that C# is a lot more refined. It's just nicer to read.
When I first started C# I thought I wouldn't get used to the { } braces but they actually help readability even more by grouping sections of code together - it groups it using a symbol and not just by relying on good indentation.

Two of my friends, on separate occasions, both commented on my C# coding and said it "looked very nice," and they both work on VB.NET & ASP.NET full time.

Aside from braces, two other things people have against C# over VB are
(a) the semicolon at the end of every line - granted, I still forget on many, many occasions to put one in especially if I have to go back and modify code. On the plus side, it's a sort of indicator that the current line is 'finished,' wrapping it up so you know you don't have to go back and add something to the end of it. Takes getting used to, and you can get used to it. If not, the compiler will spot it for you anyway :)
(b) case sensitivity - I actually love this. Intellisense usually sorts out caps for you so that resolves most coding problems. It's great for Find & Replace and just generally knowing what type of keyword you are working with - looking back over code, you know if something is a variable, class or method provided you capitalise things properly. (*edit - although, if you name variables properly in the first place, VB would pick this up and change the caps anyway as you write, so not that big a deal :) )
 
Last edited:
anarchist said:
A lot of Windows Vista is written in C# apparently.

I'd suggest its a combination of all 3 c dialects - C, C++ and c#

The older kernel code will almost certainly be written in C for speed, and at the end of the day, if it aint broke, you dont change it.

I'd imagine new Vista code would indeed be written in c#

All of the code thats been reused from XP/NT will be c++.

EDIT: Also, I'd be surprise if there weren't small snippets of asm in parts of the kernel if its a performance hotspot....
 
Last edited:
Visage said:
EDIT: Also, I'd be surprise if there weren't small snippets of asm in parts of the kernel if its a performance hotspot....
That takes me back a bit... I cut my programming teeth on z80 assembler many years ago!
 
anarchist said:
That takes me back a bit... I cut my programming teeth on z80 assembler many years ago!

Ouch.

Embedded systemns aside, I'd be surprised if anyone bothers to write hand-crafted asm nowadays. Im sure c is close enough to the metal to do anything you want, and modern optimising compilers tend to produce pretty slick asm.
 
Back
Top Bottom