Fog Creek Software
Discussion Board




What to pick - C# or VB.NET?

Hi All,

I work for a LARGE IT company and here everything is driven by 'business requirements' as they call it. It doesn’t matter what technology you know, what technology you have expertise in, you will be _thrown_ in a project depending on criteria which only God knows.

I have been working on VB 5 + Oracle 8i for last 9 months. [This despite the fact that, I had prior experience in VB 6 and I was trained on it again.]

Anyways, I am now going to get out of this project and god knows what next project is going to be.

But as the management is seeing lot of .NET projects coming up, they want everyone to learn new technology.

Now here is the confusion. What should I learn?
C# or VB.NET?

Due to tight project schedule, I really didn’t have time to look in to .NET, forget about studying C# or VB.NET. But from whatever I have read, it looks like you can leverage your knowledge of one .NET language (say C#) to another. (Or is it that I don't understand it at all?)

I have prior experience in C (2 and half years) and C++ (around 1 year) as well.

Knowing this, what do you suggest? What shall I pick up?

Also, what will be the best place/tutorials to start my endeavor with .NET?

Your views are most welcome! :)

Regards,
JD

JD
Tuesday, June 17, 2003

C#

chris
Tuesday, June 17, 2003

Our VB6 guy doesn't want to touch VB.NET with a stick.  He feels that there's just to much legacy syntax and leftovers.

We are porting our current VB work into C#.

Having experience in C/C++, C# is not a difficult transition.  What you really end up learning is the CLR rather than syntax.

We kind of think that C# borrowed a lot of syntax from C++, and a lot of features and RAD from VB.

You should feel learning C# is pretty easy.

Walt
Tuesday, June 17, 2003

The vast majority of the learning time will be spent learning the class libraries, not the language syntax. The differences between C# and VB.NET are, for the moment, few and far between, and not likely to be the kinds of things most people run into.

Right now, it seems like the better path is C#, because the better jobs seem to be asking for C# (certainly, it seems that most people learning .NET are using C#). It's counter-intuitive, but it may be anti-VB bias that's causing it. It may also be that the earliest adopters are C/C++/Java people who prefer the C# syntax, and that as .NET becomes more popular, it may shift to be that most developers know VB.NET.

I'd say learn what you think will be most comfortable for you (and if you pick VB.NET as your primary language, it probably wouldn't hurt to learn the C# syntax).

Brad Wilson (dotnetguy.techieswithcats.com)
Tuesday, June 17, 2003

I concur with Brad.  Pick whichever one you like.

The framework is by far the biggest piece that you'll be learning, the rest is basically syntax, and since you already know VB and C/C++ you should have much problems with either one.

As for tutorials, assuming you will be doing windows forms and not ASP, try http://www.windowsforms.com .

Steve Barbour
Tuesday, June 17, 2003

I would go with C# since it is more rewarding and a better investment.
C# uses C-style sintax, so switching between to C, C++, Java is kind of automatic. I used to write "If" instead of "if" when switching from  VB to C++ ...

Pablo
Tuesday, June 17, 2003

Regarding C# or VB.NET, I will leave that question to more experienced people. But as far as learning VS.NET, check out learning videos at LearnVisualStudio.net http://www.learnvisualstudio.net?referedby=54640
Good for basics. Some advanced stuff too.
(Note: The URL contains my referer ID, if uncomfortable, please do remove it :) )

Yaniv
Tuesday, June 17, 2003

I migrated from VB6 to C#. Curly braces didn't bother me, and I like the abbreviated syntax.

The great thing is that I've found it much easier to write javascript since learning C#, and Java is much easier to work with as well.

Philo

Philo
Tuesday, June 17, 2003

VB.NET

Anonymous Coward
Tuesday, June 17, 2003

One advantage of C# is that it supports embedding XML comments directly into your source code to automatically build documentation and provide Intellisense for your own functions, parameters, etc.  For some reason, Microsoft left this out of VB.NET.

http://tinyurl.com/ekzn - XML comments

Stress
Tuesday, June 17, 2003

Thanks everyone for your valuable suggestions.

It appears to me that main challenge is to learn .NET framework rather than C# or VB.NET! That's great! :)

I think I will go for C# as of now because it's been while I have used _true_ OOP language! :)

And yes, windowsforms.com link is pretty good, any other good resources ???

What you think about MSDN Episodes/shows which are present on MS site? Are they worth downloading (more than 55 MB)  and watching?

Regards,
JD

JD
Wednesday, June 18, 2003

Stress – VB.Net supports embedded XML comments too.

What do you think about the VB.Net background compilation and real time syntax checking? Or case insensitiveness? Or facile event handling? Or the parameterized properties? I found them very productive and missing from c#.

The c# proponents seem to miss the real advantages of this language: operator overloading, explicit casting, future template support, the ‘Using’ block, bit operations …

The syntax is not a reason to choose a language over the other. A poor programmer will be sloppy in either one…

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q308470

IMHO most of the programmers prefer c# because they believe it offers some noblesse to the eye of the beholder. The best programmers I worked with have no preferences and switch with ease between few languages every day.

corresi 

coresi
Wednesday, June 18, 2003

I had to make this choice moving from VB6. I chose C# and have no regrets - it took me about two weeks to be totally won over.

The verbosity of VB is one reason - if I have to convert code from VB.NET to C#, it mostly gets a lot shorter. Less typing is good, IMO.

There are a few convenience functions in VB.NET - but these often have the effect of stopping you from realising what the .NET framework is doing, not always a good thing. And some language features aren't even supported in VB.NET - you can't apply attributes to functions, for example. C# is also more tightly specified than VB.NET.

It took me a little while to get used to the case sensitivity after VB autocorrecting my typing errors, but not long.

I don't think there's a real contest here.

Dave Hallett
Wednesday, June 18, 2003

The real question is is Office VBA.NET coming out and when?

If it does, then VB.NET will be incredibly popular. If it doesn't then it can sit in the corner and chat to Microsoft Bob.

Stephen Jones
Wednesday, June 18, 2003

Right now it is a toss up. Could be that in future VB.NET will get the front seat in the RAD for small apps arena, while C#.NET goes more into the corporate dev. direction.
However, since so much is now in the framework vs. the language changing between them should be fairly straightforward at any time.

Just me (Sir to you)
Wednesday, June 18, 2003

coresi:

I don't think VB.Net does support XML commenting of code (here's another link: http://www.devcity.net/net/article.aspx?alias=vbxmldoc )

Can you point me to something on the web that says how .NET supports this in VB.NET without some kind of extra tool?

Stress
Wednesday, June 18, 2003



I'm still confused why any large company would choose .NET anything as a enterprise application strategy.

Visual Studio .NET is a nice tool to slap together a quick small website but zero scalability/portability which should be key to any enterprise strategy.

J2EE is where it's at.

James Nicoll
Wednesday, June 18, 2003

---"zero portability"----

And where exactly where you planning to carry your application off to?

You know, my house has zero portability as well. Goddam architect forgot the wheels!

Stephen Jones
Wednesday, June 18, 2003

And the "zero scalability" comment is wrong. .NET projects and websites scale quite nicely, thank you very much.

And with projects like Mono, Rotor, and Portable.Net out there, portability for .NET projects is not as bad as most people think, and will only get better.

And besides, J2EE projects may be portable across machines, but they're not portable across EJB/servlet containers, so it's not like you've really bought anything with J2EE except a different dependency.

As a consultant friend of mine put it, "Microsoft, Sun, IBM, Oracle - they're *all* just vendor scum, man."

Chris Tavares
Wednesday, June 18, 2003

Stress,

Check out:

http://www.gotdotnet.com/team/ide/

for the VB Commenter (about half way down the page).

Himanshu Nath
Wednesday, June 18, 2003

LOL! Portability raises its ugly head again.

Portability makes sense for COTS applications, but for enterprise apps?

I'll ask the same question I asked when one client said they'd decided on going with Java for its portability:
"Ah. Because of the all the Unix boxes we have sitting around here?" (the shop had over half a million dollars worth of Dell boxes running Windows 2000)

Has *any* company successfully and justifiably switched from Windows to Unix?

Philo

Philo
Wednesday, June 18, 2003



I realize portability is a foreign concept to MS heads.

Java/J2EE gives you portability across hardware platforms/OS's as well as J2EE vendors.  Not sure what kind of "enterprise" you are talking about but the ones that I do consulting for (past 10 years) have a mix of predominantly UNIX back-ends, some MS and older platforms such as mainframes/Stratus/DEC VMS etc.

I prefer to build software that will knowing port and scale to different platforms/OS ... not leave my customers stuck on Microsoft Intel 2 or 4 way box.

James Nicoll
Wednesday, June 18, 2003

I vote C#.  If you already know C-style syntax and are comfortable with it, C# will be easy easy easy.

Furthermore, VB6 and VB.NET are very similiar at first, but that can lead you to carry over your VB6 practices into the VB.NET world, which is bad.

Although I wish it weren't case sensitive, I much perfer C# over VB.NET.  And yes, I've used both.

Richard Ponton
Wednesday, June 18, 2003

Himanshu,

Thanks for that link to VB Commentor.  Works pretty nicely.  But it still doesn't do what I want it to do, and maybe I'm going crazy, but I can't get C# to do it either.

I want the XML comments to show up when I'm picking one of my classes or methods from an Intellisense dropdown like the Microsoft classes do.  If you let your selection sit on a class--a little comment tooltip pops out to the side describing it.  Maybe we aren't given this power in either language.

Stress
Wednesday, June 18, 2003

"Java/J2EE gives you portability across hardware platforms/OS's as well as J2EE vendors. "

ROTFL! Every J2EE platform has proprietary extentions, which you can feel free to ignore, but at what cost?

The place where I see the "portability" crop up all the time is not on the server front. All shops I know run an application on a platform and stick to it. They very infrequently change platforms and when they do it is almost in 100% of the cases the result of a decision for a complete replacement of the application (not just a new version). New applications go onto new platforms, but old ones never migrate. On the server front "interoperability" is a big thing, whereas "portability" is just a meme sucked in from some dubious marketing campaigns.

I have seen more interesting "portability" proposals on the client front in places that failed to standerdize on the client side. Usualy you find  10 - 15% oddball clients (mostly MacOS) alongside the usual Windows mix, that also need access to a client app. Oddly enough the client side of the Java story is not the prettiest part. In the past certainly the Mac and Linux implementations of JVM's were terrible (I hear this situation has improved). In many cases I find that running a universal Windows client, directly for the 90% and over a Terminal Server type of solution for the oddballs, is superior to the universal Java client option if the special needs division is not too ABM entrenched.

Just me (Sir to you)
Thursday, June 19, 2003

Stress,

"I want the XML comments to show up when I'm picking one of my classes or methods from an Intellisense dropdown like the Microsoft classes do.  If you let your selection sit on a class--a little comment tooltip pops out to the side describing it.  Maybe we aren't given this power in either language."

I don't have time to test this right now, but try registering your assemblies into the GAC.

Hector
Thursday, June 19, 2003

I think I am going to choose VB.net just because the code is a little easier to look at.

I know VB, Java, and C++, but I don't want to worry about typecasting if I don't need it; Although it might speed up loops?!

C# is attractive because less typing is required so that makes the choice tougher.  VB looks more RAD, redimensioning arrays.

If VB.net can use the same regular expressions as C# then VB.net is okay w/me.

Not saying I like tabing through autocomplete to speed up typing, but if I don't have to worry about capitalization, and if only VB.net has intellisense then it really would be a no-brainer for me.

Besides VB.net looks cleaner, who wants to learn more funky syntax (like w/ADO connection object)?

We are all using managed code with VB.net and C# anyway, right?

Brian R.
Friday, June 20, 2003

Oh, originally poster said he knows C, and C++, not VB.  Well, then C# is the obvious choice.

I think it's probably a poor idea to go against what languages you are most used to using.

Personally, I like 'if (  ){    } more than IF Then Endif.  I hate choosing, too. :/

Brian R.
Friday, June 20, 2003

*  Recent Topics

*  Fog Creek Home