Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. difference between C# and VB.Net except syntax Dinesh Says Thanx ....

difference between C# and VB.Net except syntax Dinesh Says Thanx ....

Scheduled Pinned Locked Moved The Lounge
csharpbusiness
68 Posts 36 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R robvon

    :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

    S Offline
    S Offline
    She chewy
    wrote on last edited by
    #37

    :confused:If VB6 is so good, why microsoft still throw in the money to invest on C#? Chewy

    S H R 3 Replies Last reply
    0
    • G Gonzalo Brusella

      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.

      D Offline
      D Offline
      deanme
      wrote on last edited by
      #38

      Gonzalo Brusella wrote:

      Basic, in general (and all his flavors: QB, Turbo, GW, etc.) is not a good and "serious" language.

      One of my undergraduate professors said the same thing about BASIC in 1985. 20+ years later Visual Basic is still one of the most used languages out there. I've heard the MS rumors about wanting to kill VB. Considering how many VB programmers there are, it is unlikely MS will be able to get rid of it any time soon.

      G 1 Reply Last reply
      0
      • D deanme

        Phil Uribe wrote:

        Smart people choose VB because it's easier.

        .....and because they can't figure out event declarations.:cool:

        N Offline
        N Offline
        NeverHeardOfMe
        wrote on last edited by
        #39

        ..no - because they don't have to!! If you want to go round making work for yourself go right ahead, but I'll be the one wearing the shades on my day off, cool cat, while you're still figuring.... :-D

        1 Reply Last reply
        0
        • R Ryan Binns

          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"

          J Offline
          J Offline
          John Fisher
          wrote on last edited by
          #40

          True, C# is the same, but there are languages on the .NET platform that allow for multiple inheritance. Eiffel is one of them, if I remember correctly.

          M 1 Reply Last reply
          0
          • C Christian Graus

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

            D Offline
            D Offline
            Dejan Petrovic
            wrote on last edited by
            #41

            Christian Graus wrote:

            if you have a choice between a skilled VB team and a skilled C# team ...

            Christian Graus wrote:

            If you have a choice between a C# team and a team who went to VB.NET from VB6 ...

            Is there a single VB.NET team that does not have an origin in the VB? :-O

            C 1 Reply Last reply
            0
            • J John Fisher

              True, C# is the same, but there are languages on the .NET platform that allow for multiple inheritance. Eiffel is one of them, if I remember correctly.

              M Offline
              M Offline
              meywd
              wrote on last edited by
              #42

              that is a limitation for OO languages, C++ allow multiple inheritance, but C#,VB.NET(which you can call, an OO copy of VB), and java doen't allow it,because they are a full OO lnaguages

              G 1 Reply Last reply
              0
              • D DineshSharma

                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

                A Offline
                A Offline
                AbuseByUnkindPeople
                wrote on last edited by
                #43

                Hi Dinesh, The key difference between C# and VB.Net is the syntax & readability. Both languages conform to the Common Language Specification (CLS) and use the Framework Class Library (FCL). Personally I prefer C#'s syntax, but I prefer how VB is case insensitive, its intellisense is smarter and you dont have the casting/converting issues which can really slow you down productivity. Off the top of my head, ReDim'ing arrays is a bonus for VB but C# as mentioned above tends to push the boundaries a little more - eg Refactoring was inbuilt in C# 2005. With porting tools (C#2VB and vice versa) getting really good, I'd recommend you use the language you feel most comfortable with. HTH Jeremy

                1 Reply Last reply
                0
                • I Igor Velikorossov

                  Christian Graus wrote:

                  The truth is, they generate the same IL

                  no they don't.

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #44

                  Igor Velikorossov wrote:

                  no they don't.

                  Maybe not exactly, but not different in any way that has a significant effect on performance, or anything else. The suggestion that C# IL is faster than VB IL is, frankly, ridiculous. Christian Graus - Microsoft MVP - C++

                  I 1 Reply Last reply
                  0
                  • D Dejan Petrovic

                    Christian Graus wrote:

                    if you have a choice between a skilled VB team and a skilled C# team ...

                    Christian Graus wrote:

                    If you have a choice between a C# team and a team who went to VB.NET from VB6 ...

                    Is there a single VB.NET team that does not have an origin in the VB? :-O

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #45

                    Lots of people are picking up VB for the first time because of Express. VB6 has been out of date for 4 years, surely someone learned VB in that time ? Christian Graus - Microsoft MVP - C++

                    1 Reply Last reply
                    0
                    • C Christian Graus

                      Igor Velikorossov wrote:

                      no they don't.

                      Maybe not exactly, but not different in any way that has a significant effect on performance, or anything else. The suggestion that C# IL is faster than VB IL is, frankly, ridiculous. Christian Graus - Microsoft MVP - C++

                      I Offline
                      I Offline
                      Igor Velikorossov
                      wrote on last edited by
                      #46

                      Christian Graus wrote:

                      The suggestion that C# IL is faster than VB IL is, frankly, ridiculous.

                      Christian pls point me where I have suggested that.

                      C 1 Reply Last reply
                      0
                      • I Igor Velikorossov

                        Christian Graus wrote:

                        The suggestion that C# IL is faster than VB IL is, frankly, ridiculous.

                        Christian pls point me where I have suggested that.

                        C Offline
                        C Offline
                        Christian Graus
                        wrote on last edited by
                        #47

                        Fair enough, I apologise for the assumption, but it's claimed often enough, and beyond that, I didn't see any reason to point out that the IL isn't exactly identical. All I meant was, the compile to the same intermediate language, not that the IL would look exactly the same. Although, I would contend they will run basically the same, for the same code. Christian Graus - Microsoft MVP - C++

                        C 1 Reply Last reply
                        0
                        • S She chewy

                          :confused:If VB6 is so good, why microsoft still throw in the money to invest on C#? Chewy

                          S Offline
                          S Offline
                          sultan alsouz
                          wrote on last edited by
                          #48

                          Think about it, if XYZ company solid cars with no choice, just black color, surely people would go for other car brand, its marketing and promotions. I still think it is better to address the competitive advantage rather than disadvantages of each language. One advantage of VB programmers is that they can focus on the business process implementations and not just debug code (funny, why compile twice, once in your brain and second in computer’s CPU) , too much space for errors can confuse and make you loose track of your goal. To get knowledge you must share it first.

                          1 Reply Last reply
                          0
                          • D DineshSharma

                            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

                            N Offline
                            N Offline
                            nobel tele gl
                            wrote on last edited by
                            #49

                            It's my experience, with .NET framework 2.0 that it's a matter of syntax, both languages have almost the same feature, is true that in VB you would need to write a little more code, and some people i know also says that VB is a "messy" language, but you can do practically the same things i both languages. It's my opinion that nothing is impossible, it's "just" at matter of enough knowledge, time and money.

                            1 Reply Last reply
                            0
                            • M meywd

                              that is a limitation for OO languages, C++ allow multiple inheritance, but C#,VB.NET(which you can call, an OO copy of VB), and java doen't allow it,because they are a full OO lnaguages

                              G Offline
                              G Offline
                              GEAK
                              wrote on last edited by
                              #50

                              Responses to a couple issues: I used to teach OOP using C++ in college and although I came up with examples using multiple inheritance I never encountered a real-world situation where it was necessary. IMHO, I don't think multiple inheritance is all it's cracked up to be. As to the difference between C# and VB.Net, I've programmed in both (moreso in VB.Net) and found very few differences between them. As well, the more current the version of the .Net framework you use (ignoring syntax), the fewer differences exist. Having said that, there is one major difference I have found: Among the developer community - at least in the region I'm living in - there appears to be a tremendous bias against developing in VB.Net. I suspect this is a throwback to the earlier versions of VB. I've found that 95% of the programs I wrote in C++ could easily be written in either C# or VB.Net and my personal preference would be VB.Net. But when I list VB.Net as my second language on a resume I'm usually declined interviews - the employers appear to be avoiding VB coders. GEAK

                              K 1 Reply Last reply
                              0
                              • D DineshSharma

                                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

                                H Offline
                                H Offline
                                Hemanth M
                                wrote on last edited by
                                #51

                                C# is a clean language.Its completely object oriented...where as VB.NET supports procedures along with classes.If your project is very big...u will feel the difference while maintaining the project. Hemanth

                                1 Reply Last reply
                                0
                                • S Super Lloyd

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

                                  K Offline
                                  K Offline
                                  Kenneth Kasajian
                                  wrote on last edited by
                                  #52

                                  It's true that more code can mean more bugs, but code bloat because keywords in one language are longer than in another is not going to contribute to "more code".

                                  1 Reply Last reply
                                  0
                                  • S She chewy

                                    :confused:If VB6 is so good, why microsoft still throw in the money to invest on C#? Chewy

                                    H Offline
                                    H Offline
                                    Habeeb Rushdan
                                    wrote on last edited by
                                    #53

                                    Good question. I was wondering the same thing too when I first heard that Microsoft had hired the former Borland Delphi guy Anders Hejlsberg to be become their lead C# architect several years ago. However, I quickly realized a good reason why those clever guys at Microsoft did it. You see, C# is very, very, and I mean very close to the syntax of Java. Therefore it is easy for Java developers to pickup C#. I have personally worked with several developers that have made the switch from Java to C# and they were pleasantly surprised at the ease of transition. To see the syntax differences for yourself I suggest you check out this excellent comparison website I found while searching on google. http://www.harding.edu/USER/fmccown/WWW/java1_5_csharp_comparison.html[^] Thanks, Habeeb Live long and code proper!

                                    1 Reply Last reply
                                    0
                                    • G GEAK

                                      Responses to a couple issues: I used to teach OOP using C++ in college and although I came up with examples using multiple inheritance I never encountered a real-world situation where it was necessary. IMHO, I don't think multiple inheritance is all it's cracked up to be. As to the difference between C# and VB.Net, I've programmed in both (moreso in VB.Net) and found very few differences between them. As well, the more current the version of the .Net framework you use (ignoring syntax), the fewer differences exist. Having said that, there is one major difference I have found: Among the developer community - at least in the region I'm living in - there appears to be a tremendous bias against developing in VB.Net. I suspect this is a throwback to the earlier versions of VB. I've found that 95% of the programs I wrote in C++ could easily be written in either C# or VB.Net and my personal preference would be VB.Net. But when I list VB.Net as my second language on a resume I'm usually declined interviews - the employers appear to be avoiding VB coders. GEAK

                                      K Offline
                                      K Offline
                                      Kenneth Kasajian
                                      wrote on last edited by
                                      #54

                                      Good post. I find multiple-inheritence to be quite useful -- it's a clean way to apply the mix-in pattern. In ATL, for instance, it's kind of slick the way you can add different functionality to your class by inheriting from an implementation. The problems with multiple implementation inheritence have been discussed in great detail by others, and they are real. However, it is also not the case that it is completely useless. In program in both C# and VB.NET. I use C# for professional development, for products, and custom solutions. I use VB.NET of in-house IT related coding. It's easy to hand over VB.NET code to an IT guy who's not really a programmer, but knows a bit of scripting, then giving him C# code. It's easier because of perception, but not reality -- but you know what they say about perception. A feature that I find invaluable in VB.NET is how you can use late-binding, similar to old VB, and VBScript. This makes script like much cleaner looking. C# lacks automatic language-level late-binding the way VB does so when you write code, it looks a lot more bulky. The downside with late binding is that you don't find out you got a problem until it's too late. I would never use it for production code -- but for IT scripting style coding, it's much better. Another thing I like about VB.NET are the new "My" variables. It's just a lot easier than using the .NET framework classes for common operations. I am so utterly indifferent about syntax, that I just can't bring myself to have an actual opinion as to which style is better -- it's just doesn't matter to me -- I'll let others debate whether BEGIN / END is better or worse thatn {, }. It would be a futile discussion with no tangible outcome. Give me a completely different language such as full ANSI Common Lisp under .NET, then we're talking about a different programming paragidm that could be interesting. But C# and VB.NET pretty much are the same thing.

                                      D 1 Reply Last reply
                                      0
                                      • C Christian Graus

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

                                        K Offline
                                        K Offline
                                        Kenneth Kasajian
                                        wrote on last edited by
                                        #55

                                        I never really bought the argument that because both languages compile into IL, then it doesn't matter how the code is generating. That's like saying that both Cobol and C and compilers compile down to assembly language, so it doesn't matter. If that were the case, JScript.NET code, which compiles down to IL, would execute at the same speed as C# code, but we all know JScript.NET generated code is slower by a magnititude.

                                        C 1 Reply Last reply
                                        0
                                        • P Phil J Pearson

                                          C# is a language; VB is a pidgin! :-D

                                          K Offline
                                          K Offline
                                          Kenneth Kasajian
                                          wrote on last edited by
                                          #56

                                          The elitist argument for C# over VB.NET is unsustainable. A new generation will realize it doesn't matter, but then again, by then VB.NET might be dead. :)

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups