difference between C# and VB.Net except syntax Dinesh Says Thanx ....
-
thanks for quick responce is there any big difference like i cant do in vb.net but able to do in c# or v/v Dinesh Sharma
I believe there is some problem with attribute in VB. Also if you got an API using byte, short, etc... (all number type beside int) it's kind of akward to use it in VB. It's still possible, but it's akward. Also I love the using(x) {} statment of C#, with automatic disposal. of course you could try {} finally { Dispose(); } in VB, but that's akward as well....
-
thanks for quick responce is there any big difference like i cant do in vb.net but able to do in c# or v/v Dinesh Sharma
don't know about .Net v2.0, but with v1.1 you can only inherit from a single base class (which can in turn inherit from a single base class, and so on) - ie. doesn't support multiple inheritance :( thats the one big limitation with VB.Net that i know of - there are many smaller ones (but none that spring to mind right now). nicko
-
don't know about .Net v2.0, but with v1.1 you can only inherit from a single base class (which can in turn inherit from a single base class, and so on) - ie. doesn't support multiple inheritance :( thats the one big limitation with VB.Net that i know of - there are many smaller ones (but none that spring to mind right now). nicko
I think you'll find that in c# as well - it's .NET that constrains this not the language
I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerry
www.many-monkeys.com -
if you remove the syntax issue much is left out.... Anyway, here on CP are a few articles doing comparison: http://www.codeproject.com/dotnet/vbnet_c__difference.asp[^] http://www.codeproject.com/useritems/vbdefamation.asp[^] And I want to add VB is much more verbose, same code is about 10% bigger, because of longer keywordand syntax. This 10% more opportunity for bug! Althoug VS.NET autocompletion is good at getting rid of them...
Super Lloyd wrote:
And I want to add VB is much more verbose, same code is about 10% bigger, because of longer keywordand syntax. This 10% more opportunity for bug!
More verbose does not necessarily mean more bugs.
-
can anybody confirm me theat whats the basic difference between c# and VB.Net. why should I use the C# for my business application development and why vb.net Dear all ...Thanks a lot for your suggestion and a lot of responces.......Thanx:laugh: Dinesh Sharma -- modified at 8:01 Tuesday 16th May, 2006
There is a degree to which you're asking about the difference between Roman Catholic and Orthodox here - a degree to which the two sides will say 'the other will burn in HELL'. The truth is, they generate the same IL, so in the hands of a good programmer, there's no difference. However, VB contains a lot of stuff that Microsoft wanted to kill, and the VB community would not let them, C# is by far a better designed language, IMO. I also personally hate VB syntax, it gives me a gut ache. Some people feel the same about C#, I'm told. So, if you have a choice between a skilled VB team and a skilled C# team, and you don't care about the stigma of VB, toss a coin. Otherwise, if you're going to learn a language, I'd say toss a coin again. If you have a choice between a C# team and a team who went to VB.NET from VB6, I'd take the C# team, every time. Christian Graus - Microsoft MVP - C++
-
don't know about .Net v2.0, but with v1.1 you can only inherit from a single base class (which can in turn inherit from a single base class, and so on) - ie. doesn't support multiple inheritance :( thats the one big limitation with VB.Net that i know of - there are many smaller ones (but none that spring to mind right now). nicko
nicko wrote:
don't know about .Net v2.0, but with v1.1 you can only inherit from a single base class (which can in turn inherit from a single base class, and so on) - ie. doesn't support multiple inheritance
That's a feature of .NET. You can only inherit from one base class, but you can implement multiple interfaces. It's the same with C#.
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
thanks for quick responce is there any big difference like i cant do in vb.net but able to do in c# or v/v Dinesh Sharma
VB has nicer syntax for events, IMO, but most of what VB offers that C# doesn't is just syntactic sugar. However, C# has always been ahead of the curve on features, until 2.0, VB did not offer operator overloading, for example. Christian Graus - Microsoft MVP - C++
-
if you remove the syntax issue much is left out.... Anyway, here on CP are a few articles doing comparison: http://www.codeproject.com/dotnet/vbnet_c__difference.asp[^] http://www.codeproject.com/useritems/vbdefamation.asp[^] And I want to add VB is much more verbose, same code is about 10% bigger, because of longer keywordand syntax. This 10% more opportunity for bug! Althoug VS.NET autocompletion is good at getting rid of them...
Super Lloyd wrote:
This 10% more opportunity for bug!
LOL - VB is a lot more than 10 % bigger, but I don't see that as causing bugs, the syntax is just more verbose. I hate it for that reason, but I wouldn't claim it causes bugs. Christian Graus - Microsoft MVP - C++
-
can anybody confirm me theat whats the basic difference between c# and VB.Net. why should I use the C# for my business application development and why vb.net Dear all ...Thanks a lot for your suggestion and a lot of responces.......Thanx:laugh: Dinesh Sharma -- modified at 8:01 Tuesday 16th May, 2006
MS developed everything FCls and APIs System level in C# Hence C# is MS preferred language Even I do prefer CSha.. "Aim to go where U have never been B4 and Strive to achieve it" http://groups.yahoo.com/subscribe/dotnetforfreshers http://himabinduvejella.blogspot.com
-
can anybody confirm me theat whats the basic difference between c# and VB.Net. why should I use the C# for my business application development and why vb.net Dear all ...Thanks a lot for your suggestion and a lot of responces.......Thanx:laugh: Dinesh Sharma -- modified at 8:01 Tuesday 16th May, 2006
DineshSharma wrote:
why should I use the C# for my business application development and why vb.net
Those who know the answer use C#. Those who have to ask use VB. Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 6:28 Monday 15th May, 2006
-
can anybody confirm me theat whats the basic difference between c# and VB.Net. why should I use the C# for my business application development and why vb.net Dear all ...Thanks a lot for your suggestion and a lot of responces.......Thanx:laugh: Dinesh Sharma -- modified at 8:01 Tuesday 16th May, 2006
C# is a language; VB is a pidgin! :-D
-
can anybody confirm me theat whats the basic difference between c# and VB.Net. why should I use the C# for my business application development and why vb.net Dear all ...Thanks a lot for your suggestion and a lot of responces.......Thanx:laugh: Dinesh Sharma -- modified at 8:01 Tuesday 16th May, 2006
Some less technical differences: 1) Culture. IMHO, VB.Net and C# developers appear think differently about a probem. C# developers like to do things the new way. VB.Net developers tend to stick with what they know. 2) Perception. In some circles, it seems that C# developers are seen as more professional than VB.Net programmers. 3) RSI. VB.Net developers do more typing than C# developers. E.g. "C#" is just 2 characters, "VB.Net" is 6. 4) Comments. C# developers can put comments in the middle of lines of code, e.g. parameter lists. VB.Net programmers have to keep their comments at the ends of lines. 5) Internet searches. VB.Net programmers tend to turn up a lot of articles on classic VB. I guess that C# programmmers are more likely to find Java articles. 6) Example code. Broadly speaking, articles on very techincal stuff seem to have C# example code. The easier to understand tutorials seem to be accompanied by VB.Net code. The truth is that if you know one of these languages, the other is exactly the same but... er... different.
-
can anybody confirm me theat whats the basic difference between c# and VB.Net. why should I use the C# for my business application development and why vb.net Dear all ...Thanks a lot for your suggestion and a lot of responces.......Thanx:laugh: Dinesh Sharma -- modified at 8:01 Tuesday 16th May, 2006
-
DineshSharma wrote:
why should I use the C# for my business application development and why vb.net
Those who know the answer use C#. Those who have to ask use VB. Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 6:28 Monday 15th May, 2006
A difference between the C "family" and the Visual Basic "family" used to be that the former was a better choice if application performace was your goal, and the latter if productivity (ie producing a working programme quickly) was more important. With the introduction of .NET this difference though perhaps still there to some extent is less the case - and one has to wonder if that is a good thing...
Marc Clifton wrote:
Those who know the answer use C#. Those who have to ask use VB.
Code-snobs choose C because they think it makes them look smarter. Smart people choose VB because it's easier. :) cheers P
-
I believe there is some problem with attribute in VB. Also if you got an API using byte, short, etc... (all number type beside int) it's kind of akward to use it in VB. It's still possible, but it's akward. Also I love the using(x) {} statment of C#, with automatic disposal. of course you could try {} finally { Dispose(); } in VB, but that's akward as well....
Since the dotnet framework 2.0, Vb.net has the using statement. As far as I know it works the same as C#
-
can anybody confirm me theat whats the basic difference between c# and VB.Net. why should I use the C# for my business application development and why vb.net Dear all ...Thanks a lot for your suggestion and a lot of responces.......Thanx:laugh: Dinesh Sharma -- modified at 8:01 Tuesday 16th May, 2006
I don't think anyone mentioned that VB is not case sensitive. The editor is more intelligent I believe. It compiles in the background and underlines errors and also remove the errors without having to recompile. As far as I am concerned these two points makes VB a better rapid development system.
-
A difference between the C "family" and the Visual Basic "family" used to be that the former was a better choice if application performace was your goal, and the latter if productivity (ie producing a working programme quickly) was more important. With the introduction of .NET this difference though perhaps still there to some extent is less the case - and one has to wonder if that is a good thing...
Marc Clifton wrote:
Those who know the answer use C#. Those who have to ask use VB.
Code-snobs choose C because they think it makes them look smarter. Smart people choose VB because it's easier. :) cheers P
Phil Uribe wrote:
Smart people choose VB because it's easier.
Why? What's easier about it? (Remember, we're talking the language here, not the tools/designers). Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
-
Some less technical differences: 1) Culture. IMHO, VB.Net and C# developers appear think differently about a probem. C# developers like to do things the new way. VB.Net developers tend to stick with what they know. 2) Perception. In some circles, it seems that C# developers are seen as more professional than VB.Net programmers. 3) RSI. VB.Net developers do more typing than C# developers. E.g. "C#" is just 2 characters, "VB.Net" is 6. 4) Comments. C# developers can put comments in the middle of lines of code, e.g. parameter lists. VB.Net programmers have to keep their comments at the ends of lines. 5) Internet searches. VB.Net programmers tend to turn up a lot of articles on classic VB. I guess that C# programmmers are more likely to find Java articles. 6) Example code. Broadly speaking, articles on very techincal stuff seem to have C# example code. The easier to understand tutorials seem to be accompanied by VB.Net code. The truth is that if you know one of these languages, the other is exactly the same but... er... different.
-
can anybody confirm me theat whats the basic difference between c# and VB.Net. why should I use the C# for my business application development and why vb.net Dear all ...Thanks a lot for your suggestion and a lot of responces.......Thanx:laugh: Dinesh Sharma -- modified at 8:01 Tuesday 16th May, 2006
VB 1.1 vs C# 1.1 VB does generate dirent IL than C# The "translation phase" of the compiler fails a litte in favor of C# (aka C# is sligtly more performant than VB). VB is the languaje that MS wants to kill... It was put into de .Net FW since there was LOTS of VB6 developers that needed to be ".Net Evangelized". Basic, in general (and all his flavors: QB, Turbo, GW, etc.) is not a good and "serious" language. I used to be a VB6 developer, but I've choosed to start .Net with C# since there is a LOT more of sample made on C# than VB.
-
Phil Uribe wrote:
Smart people choose VB because it's easier.
Why? What's easier about it? (Remember, we're talking the language here, not the tools/designers). Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
Gosh... hardly know where to begin. Two reasons: 1) Basically, because BASIC is English, that's why... even such a simple line such as for (int k = 1; k <= N; k++) is less obvious (remember what it was like to be a begeinner?) than Dim k As Integer For k = 1 To N The point is - the syntax is obvious: it's plain English as much as it can be. In C, it was a purely arbitrary choice by the language developers whether the syntax should be for (int k = 1; k <= N; k++) or for (int k = 1; k++; k <= N) And C is all like that: you simply have to learn arbitrary code conventions. Of course VB has it's share too, but far fewer; it avoids them where it can. 2) Going back to my original point, VB was developed with productivity in mind - ie to make it quicker to code with becasue it (the compiler) dealt with all sorts of thigs (such as garbage collection, for example) which the poor C developer had to code for. The result was that VB had greater overheads and slower .exe's, though for an awful lot of applications this really wasn't an issue. OK you wouldn't programme Doom in VB, but for a typical small business application VB was (and is) quite fast enough. It seems to me that with the advent of .NET this difference (performance versus productivity) is getting blurred, and I can see no reason why someone who is new to programming should struggle with the C# syntax when there is a perfectly good "plain English" language out there which can do (almost) anything that C# can and do it just as well for all but the most demanding applications. bah.. what do I know... like most coders (in my humble experience) I'm just defending and "liking" the language I feel most familiar with! cheers P