I am a beginner in .NET. I have been coding in plain ASP before, using
VBScript, and now when I'm migrating to .NET, I obviously chose VB.NET.
Obviously??? You've clearly fallen into the trap that VB.NET is somehow an
upgrade of Visual Basic and that ASP.NET is somehow an upgrade of ASP
Classic. Apart from some peripheral syntactic similarities, nothing could be
further from the truth. The reason, of course, is the .NET Framework...
Since you're familiar with ASP Classic, you no doubt enjoy the comfort
factor of Dim This As That, If...Then...Else...End If etc... But, since
you're familiar with ASP Classic, you've almost certainly had some exposure
to JavaScript, so basic C# syntax will already be totally understandable to
you...
But.... when i see code samples on net, they are mostly in C#, i also saw
a post in this newsgroup where someone mentioned that it was a very
"heated topic back in 2002 about VB.NET vs C#".
That was me...
So, my question is... what was the result of that topic?
There was no result, because there is no right or wrong answer... Both
languages are (almost) identical in terms of functionality - the only main
advantage that C# had over VB.NET was support for unsafe code i.e. pointers.
The reason that both languages are (almost) identical is because they both
target the .NET Framework. At it most simplistic level, it really doesn't
matter at all what .NET language you use - they are all identical...
What is best to go for, VB.NET or C#? and why?
Both, and then decide which you prefer.
It's my personal opinion that VB.NET is a totally unnecessary language, and
it exists purely for reasons of marketing. Back in early 2002, outside of
Microsoft and a tiny beta test community, there were no C# programmers at
all. But there were millions and millions of VB programmers, and Microsoft
weren't about to alienate them by releasing a new development suite with no
flavour of Basic...
Prior to .NET, I'd made my living almost exclusively with the various
dialects of Basic right back as far as QuickBasic and on through VB for DOS,
VB for Windows, VBScript, AccessBasic, WordBasic, VBA etc.
But, after about a day with C#, I knew that I never wanted to write another
line of Basic again! And, apart from one piece of work in 2004 that I simply
couldn't turn down, I never have...
However, that's just my opinion...