difference between C# and VB.Net except syntax Dinesh Says Thanx ....
-
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
-
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
Dim k As Integer I disagree. This is verbose, leading to loss of productivity. It's confusing. "Dim"? Dim what? The lights? The brain of the programmer? Even if you know that "dim" stands for dimension, why are we "dimensioning k as an integer?" And integer doesn't have a dimension, except 1, and that's basically just a number of bits. For k = 1 To N This doesn't illustrate that Basic is for smart people, it illustrates that Basic dumbs you down. In the C syntax, I can have multiple initializers, multiple conditions, and multiple incrementors, all in one simple statement. you simply have to learn arbitrary code conventions. Any language is like that. Dim k as integer is no less arbitrary. And I'd argue that the ordering of the clauses in the for loop are actually well thought out. which the poor C developer had to code for. Garbage collection has its pros and cons. I for one never had a problem with new and delete. a perfectly good "plain English" language When I look at VB, I cringe because it is so unintuitive, verbose, and syntactically inconsistent. I can't site any examples because I don't remember any, offhand. I'm just defending and "liking" the language I feel most familiar with! Heh. Well, so am I. But I've also found that people I've had to work with with years of VB experience simply don't know anything about fundamental programming practices. I don't find that as much with C/C++ programmers, but sadly, I'm finding it to be less true with C# programmers. 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
-
Dim k As Integer I disagree. This is verbose, leading to loss of productivity. It's confusing. "Dim"? Dim what? The lights? The brain of the programmer? Even if you know that "dim" stands for dimension, why are we "dimensioning k as an integer?" And integer doesn't have a dimension, except 1, and that's basically just a number of bits. For k = 1 To N This doesn't illustrate that Basic is for smart people, it illustrates that Basic dumbs you down. In the C syntax, I can have multiple initializers, multiple conditions, and multiple incrementors, all in one simple statement. you simply have to learn arbitrary code conventions. Any language is like that. Dim k as integer is no less arbitrary. And I'd argue that the ordering of the clauses in the for loop are actually well thought out. which the poor C developer had to code for. Garbage collection has its pros and cons. I for one never had a problem with new and delete. a perfectly good "plain English" language When I look at VB, I cringe because it is so unintuitive, verbose, and syntactically inconsistent. I can't site any examples because I don't remember any, offhand. I'm just defending and "liking" the language I feel most familiar with! Heh. Well, so am I. But I've also found that people I've had to work with with years of VB experience simply don't know anything about fundamental programming practices. I don't find that as much with C/C++ programmers, but sadly, I'm finding it to be less true with C# programmers. 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
Marc Clifton wrote:
But I've also found that people I've had to work with with years of VB experience simply don't know anything about fundamental programming practices
Well, yes, but there are two sides to this: to some people, progamming is an art, a love, and they want to understand it; to others, it is a tool no more no less and they couldn't care less about the inner nuts and bolts, they just want to get a job done. No one insists that all car drivers understnad the workings of thr internal combustion engine, and I still think that for anyone who wants to program for no other reason than as a means to a quick end, VB is a "better" choice. Which is by no means to suggest that "serious" programmers shouldn't use VB; I consider myself serious and I do, though my work is with relatively small businesses and the applications I produce do not need to be optimised for performance - with CPU speeds and disk space being what they are these days I could be awfully sloppy in my programming and the end-user wouldn't know. I try not to be, of course :-) cheers P
-
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++
:laugh:That was a biased answer if ever I saw one. The implication is that since you consider a VB6 programmer to be a dud, they will still be duds if they move to VB.net but fine of course if they adopt curly braces and hit c# (from VB6 of course) Give me two teams, two jobs, two languages. 9 times out of 10 the VB team will deliver sooner and produce more maintainable code which is handy when they all leave for a job in C# at you place. C#: If its hard to write it should be hard to understand
-
:laugh:That was a biased answer if ever I saw one. The implication is that since you consider a VB6 programmer to be a dud, they will still be duds if they move to VB.net but fine of course if they adopt curly braces and hit c# (from VB6 of course) Give me two teams, two jobs, two languages. 9 times out of 10 the VB team will deliver sooner and produce more maintainable code which is handy when they all leave for a job in C# at you place. C#: If its hard to write it should be hard to understand
robvon wrote:
The implication is that since you consider a VB6 programmer to be a dud, they will still be duds if they move to VB.net but fine of course if they adopt curly braces and hit c# (from VB6 of course)
No, that's totally not what I said. Here is what I said: VB.NET contains a lot of terrible stuff that came over from VB6. For that reason, I would not hire someone who moved from VB.NET, because they will be trying to use it as if it was still VB6. I base this on my observations in programming forums, where lots of people are fighting VB.NET, trying desperately to turn it into VB6. Sadly, it's still half way there, for those who want it to be. If they were to hit C#, they would not have the ability to write the bad code that can be written in VB.NET.
robvon wrote:
9 times out of 10 the VB team will deliver sooner and produce more maintainable code which is handy when they all leave for a job in C# at you place.
Now this is a load of biased crap.
robvon wrote:
C#: If its hard to write it should be hard to understand
See, I said that I find VB.NET hard to write and understand. I didn't say that either language was either of those things. I just said that it's a matter of personal bias. I spoke to someone in the MSDN forums the other day, complaining that VB6 only allows code files to be 52325 lines long. You think that 9 times out of 10, VB teams write more maintainable code ? I doubt it. Christian Graus - Microsoft MVP - C++
-
:laugh:That was a biased answer if ever I saw one. The implication is that since you consider a VB6 programmer to be a dud, they will still be duds if they move to VB.net but fine of course if they adopt curly braces and hit c# (from VB6 of course) Give me two teams, two jobs, two languages. 9 times out of 10 the VB team will deliver sooner and produce more maintainable code which is handy when they all leave for a job in C# at you place. C#: If its hard to write it should be hard to understand
I worte a VB.net program and then translated it to C#. The only thing that was different is the Module in VB.Net. The other thing was late binding - i found it...different in C#. Botton line it the same thing. The only reason i choose c# is that my fellow c++ programmers could understand my code. (c++ programmers has the tendancy to wipe their arses with vb code if they see it - old habbits die hard) If you can spell Chuck Norris in Scrabble - you win forever:-D
-
robvon wrote:
The implication is that since you consider a VB6 programmer to be a dud, they will still be duds if they move to VB.net but fine of course if they adopt curly braces and hit c# (from VB6 of course)
No, that's totally not what I said. Here is what I said: VB.NET contains a lot of terrible stuff that came over from VB6. For that reason, I would not hire someone who moved from VB.NET, because they will be trying to use it as if it was still VB6. I base this on my observations in programming forums, where lots of people are fighting VB.NET, trying desperately to turn it into VB6. Sadly, it's still half way there, for those who want it to be. If they were to hit C#, they would not have the ability to write the bad code that can be written in VB.NET.
robvon wrote:
9 times out of 10 the VB team will deliver sooner and produce more maintainable code which is handy when they all leave for a job in C# at you place.
Now this is a load of biased crap.
robvon wrote:
C#: If its hard to write it should be hard to understand
See, I said that I find VB.NET hard to write and understand. I didn't say that either language was either of those things. I just said that it's a matter of personal bias. I spoke to someone in the MSDN forums the other day, complaining that VB6 only allows code files to be 52325 lines long. You think that 9 times out of 10, VB teams write more maintainable code ? I doubt it. Christian Graus - Microsoft MVP - C++
Christian Graus wrote:
VB teams write more maintainable code ? I doubt it.
Totally agree with you. Maintaining code is not the job of the language nor is a language (shall i say) designed to do so. YOU as progammer must maintain your code through documentation. Production wise - no difference Chuck Norris will figure out the real Da Vinci Code
-
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
-
:laugh:That was a biased answer if ever I saw one. The implication is that since you consider a VB6 programmer to be a dud, they will still be duds if they move to VB.net but fine of course if they adopt curly braces and hit c# (from VB6 of course) Give me two teams, two jobs, two languages. 9 times out of 10 the VB team will deliver sooner and produce more maintainable code which is handy when they all leave for a job in C# at you place. C#: If its hard to write it should be hard to understand
Nothing is hard unless you dont know it, same with spoken languages. arabic is hard for non arabs (specially the odd looking letters), but it is easier for arabs to write a whole arabic book than speak a single sentence in English, it is really what you know best. But as a VB6 (vb.net now) programmer, I can tell you one VB advantage over C#, it is fully supported in MS office (as Macros), luckily everyone has MS office, no need to download a complier or install one. It is nice to show a trick or two when a friend has MS office installed on his computer and you can immediately code and compile. To get knowledge you must share it first.
-
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++
Christian Graus wrote:
The truth is, they generate the same IL
no they don't.