views:

354

answers:

11

I've been developing solely for the web for more than 6/7 years now, and before that I developed for about a year on Visual Basic 6 (I was pretty comfortable with it at the time) and for one or two months on C# (I forgot most of what I had learn though).

The thing is I've some ideas for some small desktop applications, I thought of developing in Python but none of the available GUI frameworks give me the ease of use I had back when I developed VB, so I'll start developing on Visual Studio again.

My current knowledge of .NET is very limited, what would be the fastest way to get me back on track? What language should I choose between C# and VB? Where can I find reference material and tutorials or books on it?

Thanks in Advance

+3  A: 

C# is arguably better, its based on a standard and is similar to JavaScript/ActionScript and other languages that you might use or have used during development.

Some good references include The MSDN site, www.asp.net, http://www.codeproject.com/

Mark Redman
+2  A: 

I am currently converting an old VB6 application to VB.NET, prefer to work in C#, and have been developing in .NET a fair amount.

C# feels better if you're coming from familiarity with OO programming, specifically JAVA and C++.

Since you're more comfortable with VB6, a lot of the sugar is the same in VB.Net, but it offers the same Object Oriented features of C#.

This is a great comparison.

Coming from familiarity with VB6, C# and VB.NET are the same on the back end and VB.NET would be a better choice for you (I prefer C#, if you care).

The best tutorial for me on c#: MSDN C# Programming Guide

The VB.NET equivalent

I also prefer C#, even though I had more experience with VB the C# syntax is more appealing to me. Thanks, for the links that was what I was looking for.
Alix Axel
+1  A: 

I would suggest that you stick with VB.net as it is similar to VB (I personally prefer C#). With VB.net you get almost the same power as C#. And why do you want to put effort learning a language like C# with syntax that is more like C and nowhere close to VB, especially when you are putting in efforts to learn a new framework. Also, you have the option of developing in WPF. I would start by looking at http://windowsclient.net/.

What matters is that VB.net or C# you now have the power of .net framework.

P.K
Can you give me some lights on WPF? What it is, advantages and maybe some more URLs?
Alix Axel
http://windowsclient.net/ will give you insights on technology. But, just to quote a few practical advantages:* What you can do with UI in WPF has no bounds. You can do something like have a datagrid in a menu is extremely simple in WPF.*If you are from web background, WPF coding will be intuitive.Josh is an authority on WPF. Look at his blog:http://joshsmithonwpf.wordpress.com/a-guided-tour-of-wpf/
P.K
+7  A: 

Not to get involved in language holy wars, but I've worked with five developers who came from VB6 to .Net, plus myself. That's not a lot, but what I saw held true for all of us.

Both languages are VERY good and I personally have no preference. I feel equally comfortable in both, and I really don't think either is superior to the other.

BUT just based on what I've seen, when moving to .Net, you're better off starting with C# for one reason only. .Net development is more about learning and using the class library, not language semantics. VB6 hides some of this by putting shortcusts into the language spec.

When you're learning a language that is not similar to what you've already done, you're more likely to look for the "right" way to do things.

Microsoft did a lot to make VB.Net easy for VB6 developers to pick up on, so you can easily code on VB.Net very similarly to what you did in VB6. This means that it's extremely easy to rely on the "shortcuts" and bring bad habits into your .Net development. So you see people who don't truly "get" things like the differences in ADO.Net and their programs have bad performance and design issues because of this.

Added several hours later based on comments

I just want to clarify that I am not stating that VB is inferior to C#. As pointed out, both compile down to the same MSIL, and both languages are good. What I meant by "VB6'ers bringing in bad habits" can be clarified with an example:

Two of the five I worked with did the same exact thing in code. They needed to get records from a database and loop through them in order to perform some maniuplation onthe data. The normal thing to do would be to either use a DataReader or DataAdatpter with a DataTable and loop through that. However, both of them instead created some array variables and looped through the DataReader results and assigned them to the arrays of arrays, and then looped through the arrays to do their calculations, meaning that they not only added unnecessary computing cycles, they also took items out of a collection that could be accesed with things like

Dim FullName AS String = CurrentRow("FirstName").ToString()  + " " + CurrentRow("LastName").ToString()

to (assuming that ar is the array variable and i is the indexer)

 Dim strFullName AS String = ar(i)(3).ToString()  + " " + ar(i)(4).ToString()

Their method worked, but added extra cycles, and made the code harder to understand. I asked each of them why they did it this way. One of them had wanted to be able to use the data after the connection was closed so they didn't accidentally update something. This is something you would need to worry about with a RecordSet, but not with a DataReader or a DataAdapter. This was clearly someone not grasping the difference between the VB6 way of doing things and ADO.Net. The other one just felt more comfortable with arrays because she was familiar with them.

So my point had nothing to do with one language being "better" than the other. That would be arrogance and it would also be uninformed. Functionally, there is not much you can do in one that you can't do in the other. And I LIKE some of the VB.Net "shortcuts" I mentioned earlier on. (VbNewline vs System.Environment.NewLine and the whole My namespace, InputBoxes, etc).

My point was that when learning something completely unfamiliar, you're less likely to get thrown by your own preconceptions. We saw things like this go away when we switched to a C# shop from a VB.Net shop. It had NOTHING to do with the language, and EVERYTHING to do with the developers being forced to learn properly instead of taking shortcuts.

So, I still stick by my original advice for this reason, but by all means, if you like VB, go with it. And don't worry about anyone "looking down" on you for using it. All of that "my language is better than your language" stuff is nonsense. Some languages have advantages over others, but in the .Net world, in the VB vs. C# debate, both languages are actually so close that there's not much of a difference. The debate as pointless (and grown up) as the "my daddy can beat up your daddy" argument.

David Stratton
This is wrong. VB.NET and C# both "compile" down to MSIL (Microsoft Intermediate Language). So does IronPython, F#, and anything else targeting the common language runtime. VB.NET is a "first class" language and even has its own dedicated development team. That's the beauty of .NET, it takes language syntax out of the equation. It doesn't matter what you write the code in, b/c it's all MSIL in the end. Pick what you like...I prefer VB.NET, although I know C# very well.
Mick
IronPython... Does that mean I can use the visual GUI editor of visual studio to code Python?! That would be awesome.
Alix Axel
First good answer on this thread. +1
Konrad Rudolph
Actually eyze, I think I'm sure that Visual studio has that plugin n ready. Here is the project: http://IronPython.codeplex.com/ They've rewritten most of the python base api I think, so try running your new scripts on it, maybe even faster. Note it also runs on Mono (Linux).
Dykam
+2  A: 

The logic that most people coming from a VB background use is that VB.net is the natural evolution of VB and that it would be the easiest to pick up. The flaw with this logic is that the biggest hurdle moving to .net is learning the framework. Language syntax is fairly easy to pickup, regardless of the language.

As you look for code examples for specific programming techniques you will find that the overwhelming majority of those examples are provided in C#. Do yourself a favor and start with C#. There is a list of arguments as long as my arm of why C# is the superior language (which I do believe it to be) but the most practical reason to pick it is just a matter of convenience. If you opt for VB.net you will end up learning C# in a round about way anyway as you get increasingly frustrated attempting to find articles, books, forum posts etc with examples in vb. The types of people that provide these examples gravitate to c# and only a few provide examples in both languages.

Jim Petkus
+1  A: 

I came from a Visual FoxPro background, and found the VB.NET language more natural to learn - the syntax was a lot closer to VFP. This made getting productive a lot quicker. I suspect you may find the same coming from VB.

However, if you do choose the VB.NET route, you may find there are a lot more code examples on the web in C#. I find that a converter like www.developerfusion.com/tools/convert/csharp-to-vb is very useful for translating them into VB.NET (it also can work the other way round).

kevinw
Thank you very much for that link, I'm gonna go with C# since the syntax is more familiar to PHP but that link will come in handy. =)
Alix Axel
+1  A: 

My current knowledge of .NET is very limited, what would be the fastest way to get me back on track? What language should I choose between C# and VB?

Let me start by saying I like VB.NET and C#. I know them, and I use them on occasion...

That being said, have you considered Delphi? Unlike VB.NET and C#, it compiles to native code, like C++. If you are familiar with VB 6, it will be an easy transition to Delphi.

The creator of Delphi (Anders Hejlsberg) also created C#.

You can use Turbo Delphi (based on Turbo Delphi 2006) for free. There are some great resources available online for learning Delphi as well.

Many popular programs are written in Delphi, including Skype, Spybot Search and Destroy, Macromedia Homesite, Copernic Desktop Search, and others.

If you are a looking for a programming language that is easy to use, powerful, and has a very high-quality GUI library, then Delphi should be closely considered. Delphi (and C++ Builder) both take advantage of the VCL (Visual Component Library), which is a very high-quality, constantly updated GUI toolkit.

Give it a whirl, you won't regret it!

Mick
I've Mick, and let me say that Delphi was my favorite programming language when I was younger, but .Net has a bigger community and I can play with it for free using the Express editions.
Alix Axel
+2  A: 

I spent over 10 years doing VB. Version 1 to 6. VB.NET seemed like the natural migration when it came out, but I loathed it from the outset. I could not get my head around it.

So I learnt Java, but it wasn't very satisfying. At least I could now run my apps on Linux.

Then Mono came along, so I learnt C#. What a breath of fresh air! The .NET framework now made a whole lot of sense, where as with VB.Net it just felt wrong to me. Square peg in a round hole.

FlappySocks
Nice to know, actually I'm very interested in learning more about the .Net should I read anything that targets the .Net framework specifically or will I naturally learn it by reading/coding in C# or VB? What route did you took?
Alix Axel
It can be hard to get out of the VB mindset. Once I got to grips with the syntax (mostly learning by example), the .NET framework just fell into place, and learnt along the way.
FlappySocks
+2  A: 

Hi,

I've worked with Visual Basic for around 9 years and made some pretty popular applications in it. When I migrated to .Net I went with VB.Net and for the 1st year I had a lot of fun with it. It did allow me to bring along some VB baggage and get things done faster.

Later however as I read and re-read the code samples in C# and started picking up some of the language I was impressed by the more disciplinary approach. I wrote some of my existing app's code (class libraries) in C# and I loved the experience so much that I quit VB.Net about 3 years ago and since then I've been coding exclusively in C#.

These days I make web apps and win apps and all of them are in C#.

Cyril Gupta
A: 

VBDepend can help to understand the existing vb6 code before migration, and accelerate the process during migration.

Issam