Re: C# or VB.NET?



Hi,

Just as i was about to be convinced to go with c#, CMoya's comments have again put me back at 0-point :-)

Well, i am a part-time/casual developer. By profession i am a SysAdmin. Developing is something i just like doing in my free time, and i create small applications for internal use i our company, which are often appreciated, since the full-time developers are always working for customers.

The reason why i started with vb.net is because of the familiar syntax of VBScript (Dim, if then else, for each etc etc...). I do have very good knowlege og Javascript and a bit knowlege of J2EE as well. So, i dont really think it will be much of trouble for me to switch to c#. Also because i'm still a beginner with .NET.

But again, CMoya's comments sounds quite promising in favour of VB. Though honestly, i didn't understand a few things he mentioned :-). But all i'm looking for is "best" way to choose.

Thank you all for your helpful replies.

Regards.

"Mark Rae [MVP]" <mark@xxxxxxxxxxxxxxxxx> wrote in message news:%23uLjs$3UIHA.5300@xxxxxxxxxxxxxxxxxxxxxxx
"M. Ali Qureshi" <m.ali.qureshi@xxxxxxxxxxx> wrote in message news:726AB418-B792-4C73-A8A0-360D6BBD7184@xxxxxxxxxxxxxxxx

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...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

.



Relevant Pages

  • Re: C# or VB.NET?
    ... VBScript, and now when I'm migrating to .NET, I obviously chose VB.NET. ... The reason that both languages are identical is because they both target the .NET Framework. ... 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... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Case-insensitivity considered harmful
    ... are lots where it is very hard to distinguish many lower-case letters. ... fonts use a non-traditional '0' for that reason, ... In computer languages, ... common convention was commentary in mixed case and code in upper. ...
    (comp.arch)
  • Re: exponentiation operator (lack of)
    ... > of exponentiation operator. ... Those 3 languages were widely used in their heyday although ... of course were not useful for low-level system programming. ... One reason: the ability of C to interact closely with the hardware ...
    (comp.lang.c)
  • =?iso-8859-1?q?Re:_What_does_G=F6dels_Incompleteness_mean_for_the_Working_Mathematician=3F?=
    ... > Axiomatic languages do not lead to contradiction unless we have reason ... > There is no reason to believe that either is the case in Peano ... > algorithm computes an arithmetical relation R, ... theorems, theorems about dimension). ...
    (sci.math)
  • Alejandro can inevitably lean their module
    ... it seeks a reason too correct regarding her quick game. ... For Satam the inspector's ... Otherwise the developer in ... reservoirs to correctly alter. ...
    (sci.crypt)