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. 10 Reasons Why Visual Basic is Better Than C#

10 Reasons Why Visual Basic is Better Than C#

Scheduled Pinned Locked Moved The Lounge
csharpcomquestion
143 Posts 57 Posters 125 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.
  • P Peter Adam
    1. type casting: one can save a pair of parentheses, compared to C#.
    S Offline
    S Offline
    sergiogarcianinja
    wrote on last edited by
    #76

    VB has a very useful typecasting.

    Dim num As Integer = "one"

    Very useful. Any VB programmer who thinks it can criticizes any other language, MUST use Option Strict.

    P 1 Reply Last reply
    0
    • J Jorgen Andersson

      Here[^] Now, where was that bulletproof vest? <Takes cover under a fireproof blanket> A bulletproof vest can take at least one 45ACP, right?

      Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

      P Offline
      P Offline
      Pascal Ganaye
      wrote on last edited by
      #77

      I can write both languages equally. I just hate the snobbery that is displayed by some C# programmers. The differences between the languages is getting slimmer with every version. As I see it C# is much nearer to VB.Net than it is to C. There are many things that were in VB long before they appeared in C#. The article is right, the Visual Studio IDE recompile on the fly and show syntax errors faster in VB than it does in C#. This is not about the language but it can be taken into account when you choose a language. This days I work mainly in C# and I enjoy it. The one thing I miss is the ability to put a property in a ref our out parameter. VB can do that and C# (at least 3.5) can't.

      P 1 Reply Last reply
      0
      • J Jorgen Andersson

        Here[^] Now, where was that bulletproof vest? <Takes cover under a fireproof blanket> A bulletproof vest can take at least one 45ACP, right?

        Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #78

        All of you are missing the main point: Both C# and VB are better than Java.

        1 Reply Last reply
        0
        • S sergiogarcianinja

          VB has a very useful typecasting.

          Dim num As Integer = "one"

          Very useful. Any VB programmer who thinks it can criticizes any other language, MUST use Option Strict.

          P Offline
          P Offline
          Peter Adam
          wrote on last edited by
          #79

          Anything is more useful than the (type)object of C# beyond the most basic typecasting. Delphi's type(object) and VB's CType(object,type) leaves us something that can be followed by a dot at least.

          P S 2 Replies Last reply
          0
          • S sergiogarcianinja

            Actually, they aren't the same. VB.net was created with backwards compatibility with VB 6.0, with in mind, some ugly things happens (some of these VB programmers like), like the automatic type conversion, the rounding of integers, the internal VB functions, and the list goes long. The first version of .net, come in times when the Java are becoming popular between desktops and Delphi are going to be the most used language to desktop programming. Microsoft created "a plus" for the VB 6 programmers and introduced its brand new language, the C#. As a experienced VB.net and C# programmer (and ok, Delphi too), I rather say that VB is one of the worst languages I know. His apparently easy syntax do any people think they can develop, and almost all programmers that use VB.net as his primary languages aren't good programmers at all. This is my opinions, you can start offending my mother now. :D

            C Offline
            C Offline
            CPallini
            wrote on last edited by
            #80

            sergio_ykz wrote:

            VB.net was created with backwards compatibility with VB 6.0

            Nope. That's not true (at least in my opinion).

            sergio_ykz wrote:

            This is my opinions, you can start offending my mother now.

            I balanced the silly 1 you got.

            Veni, vidi, vici.

            1 Reply Last reply
            0
            • J Johnny J

              I really don't understand the C# vs VB antagonism. If you're a professional programmer, you should be able to code in both languages with same ease. When C# people roar out against VB, they're being plain childish. As are the VB people when they claim that they don't understand C#.... I code in both languages and like them both!

              Why can't I be applicable like John? - Me, April 2011
              -----
              Beidh ceol, caint agus craic againn - Seán Bán Breathnach
              -----
              Da mihi sis crustum Etruscum cum omnibus in eo!
              -----
              Just because a thing is new don’t mean that it’s better - Will Rogers, September 4, 1932

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #81

              Johnny J. wrote:

              If you're a professional programmer, you should be able to code in both languages with same ease.

              Why? While they both target the same CLR, the syntax of the two languages is sufficiently different that while you may be able to code in one fluently, you might find the other more complicated. This has nothing to do with being a professional programmer. I don't dislike VB.NET, nor do I particularly like it. I am ambivalent towards it - if it had never been created, I wouldn't have felt the need to bemoan it; but similarly I don't feel the need to bemoan its existence. As my background is C/C++, the syntax of C# feels more natural to me, but I fully appreciate that it feels alien to a VB.NET programmer. That doesn't mean they aren't of the same standard as me, it just means they are familiar with a different syntax.

              *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

              "Mind bleach! Send me mind bleach!" - Nagy Vilmos

              My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

              1 Reply Last reply
              0
              • P Peter Adam

                Anything is more useful than the (type)object of C# beyond the most basic typecasting. Delphi's type(object) and VB's CType(object,type) leaves us something that can be followed by a dot at least.

                P Offline
                P Offline
                PIEBALDconsult
                wrote on last edited by
                #82

                s = ((string) o).Trim()

                P 2 Replies Last reply
                0
                • J Jorgen Andersson

                  Here[^] Now, where was that bulletproof vest? <Takes cover under a fireproof blanket> A bulletproof vest can take at least one 45ACP, right?

                  Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

                  M Offline
                  M Offline
                  Matthew Graybosch
                  wrote on last edited by
                  #83

                  The last reason, involving extending arrays, shouldn't be relevant. If you're wasting time extending arrays instead of manipulating a generic list, and then calling List.ToArray() (or List(of T).ToArray() if you insist on VB) when you're done manipulating the collection's contents and need to return the array, then you're probably doing it wrong.

                  When posting here, I do not represent anybody but myself.

                  1 Reply Last reply
                  0
                  • S SteveRW

                    It seems to me that C# devs should be getting on with coding instead of spending their time moaning about us VB guys. At the end of the day its the front end that matters to a customer.

                    Mine is not to reason why. Mine is just to code and cry. http://www.skillsmaster.co.uk

                    M Offline
                    M Offline
                    Matthew Graybosch
                    wrote on last edited by
                    #84

                    What really matters is getting paid. If I get paid the same amount per hour either way to use C# or VB, then I'll keep my preferences (C#) to myself and give the client his money's worth.

                    When posting here, I do not represent anybody but myself.

                    V A 2 Replies Last reply
                    0
                    • Sander RosselS Sander Rossel

                      I love VB as a language. I also completely agree with the IntelliSense thing... C# IntelliSense is a disaster if you're used to VB. For example: Typing VB: Dim ex As ExcepR... Oops, backspace, tab and it's there. Typing C#: ExcepR... Oops, backspace, no IntelliSense window pops up, either four times backspace or Shift + Home + Delete/Backspace. If you're lucky you don't have to switch to a new line to get IntelliSense support again! This becomes really very frustrating when you got code like obj.Property1.Property2.Property3... However, one reason NOT to use VB...

                      Form1.Text = "What the? Since when is Text a Shared/static Property!?"

                      The answer to that question is: Since VB1. And it's still there for 'backwards compatibility' (the compiler does create an instance though) :) So much for Object Orientism. Another one is the default of Option Strict Off. I've seen 'modern' VB code that used the horrible Form1.Text thing and Option Strict Off... You'll never see that in C#. Of course bad code can be written in both languages and with that philosophy in mind I don't really care which language I write. I just slightly prefer VB for IntelliSense and Event Handling in WinForms (that guy is so right about that!) :)

                      It's an OO world.

                      public class Naerling : Lazy<Person>{
                      public void DoWork(){ throw new NotImplementedException(); }
                      }

                      P Offline
                      P Offline
                      PIEBALDconsult
                      wrote on last edited by
                      #85

                      I spent a year doing VB.net in Visual Studio and the Intellisense/autocomplete drove me nuts -- it kept deleting stuff I'd already typed. :mad: It never does that with C#.

                      S 1 Reply Last reply
                      0
                      • J Jorgen Andersson

                        Here[^] Now, where was that bulletproof vest? <Takes cover under a fireproof blanket> A bulletproof vest can take at least one 45ACP, right?

                        Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

                        F Offline
                        F Offline
                        Fabio Franco
                        wrote on last edited by
                        #86

                        Jörgen Andersson wrote:

                        Now, where was that bulletproof vest?

                        I don't think that will be enough. You may consider moving to a deep bunker. About the article: 1 - Of those 10 reasons, mostly are unfounded and gives a pretty good impression that the author is very inexperienced on the subject he's writing about. 2 - For the same reason above, I get goose bumps when I inherit VB.Net code from a VB.Net developer. Not that VB.Net developers are inherently inexperienced, but I see far more bad VB.Net code than bad C# code. 3 - I'd say there are a hundred reasons why C# is better than VB.Net.

                        "To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson "Our heads are round so our thoughts can change direction." ― Francis Picabia

                        1 Reply Last reply
                        0
                        • P PIEBALDconsult

                          s = ((string) o).Trim()

                          P Offline
                          P Offline
                          Peter Adam
                          wrote on last edited by
                          #87

                          There are the extra parentheses mentioned by me above.

                          1 Reply Last reply
                          0
                          • G Gary Wheeler

                            I sincerely hope checked and the article is satire. If it isn't, the guy's I wrote the following because I'm an idiot: 1. Writing software well is a matter of attention to details. If you can't be arsed to even get the name of something right, you're probably going to screw up more important things. 2. If you're going to criticize a language, at least get your examples right. His C# code doesn't duplicate the logic in his VB. 3. Learn how your IDE works, moron. I can assign events in my C# code any time I like, and I'm using VS2008. 4. These are operators, which I would expect to be concise. Can you imagine writing this:

                            proportion = openquantity openquantity a addto b addto c addto d closequantity dividedby e closequantity multipliedby 100

                            instead of

                            proportion = ((a + b + c + d) / e) * 100

                            Secondly, programming is symbol manipulation. As in my response to #1, if you can't get this right, there are a whole bunch of other things you won't get right. 5. Sigh. Snippets in the IDE. The guy's like a carpenter who has to be told how to use a hammer every morning. 6. They's in the bloody CLR library. In 30 years of programming, not once have I needed to use the mortgage payment function. As far as 'is number' goes, I do localized applications. The library functions for validating localized numbers are usually inept. The .NET versions are actually pretty good, from what I've seen. They seem to work well for common number formats found in the U.S., Europe, and Asia. 7. VB's line continuation character is as annoying as Pascal's use of the semicolon as a statement separator. It's a special case you have to remember all of the time. At least with the C-style languages, you just put the semicolon at the end of every statement. Period. 8. To-may-toe, To-mah-toe. 9. VB encourages you to be sloppy. Once again, point #1. 10. C# gives you a whole lot more control over data structure transformations. With a language that encourages sloppiness, I wouldn't expect it to handle this kind of thing in a fashion that performed well.

                            Software Zen: delete this;

                            P Offline
                            P Offline
                            PIEBALDconsult
                            wrote on last edited by
                            #88

                            Gary Wheeler wrote:

                            you just put the semicolon at the end of every statement. Period.

                            Even after a compound statement? :-D

                            G 1 Reply Last reply
                            0
                            • P PIEBALDconsult

                              s = ((string) o).Trim()

                              P Offline
                              P Offline
                              Peter Adam
                              wrote on last edited by
                              #89

                              Anyway, it can be more interesting, defeating intellisense a bit longer: int _ownerid = ((dsApartmentHouse.OwnerLookupRow)((DataRowView)OwnerLookupBindingSource.Current).Row).OwnerId;

                              1 Reply Last reply
                              0
                              • P PIEBALDconsult

                                Gary Wheeler wrote:

                                you just put the semicolon at the end of every statement. Period.

                                Even after a compound statement? :-D

                                G Offline
                                G Offline
                                Gary Wheeler
                                wrote on last edited by
                                #90

                                Sigh. I thought I felt a petard-wedgie coming on. Well, at least it's harmless if you do.

                                Software Zen: delete this;

                                1 Reply Last reply
                                0
                                • M Mycroft Holmes

                                  Actually that was the reason I rejected learning c# when .net first came out. Intellisense now makes the issue irrelevant but a VB dev loathes the fact that the IDE does not format the variable name after typing, it is a form of validation that was very useful.

                                  Never underestimate the power of human stupidity RAH

                                  E Offline
                                  E Offline
                                  EngleA
                                  wrote on last edited by
                                  #91

                                  Intellisense? THAT's the reason? Not, IDK, Naming Standards??? lol... the guy who wrote the article is an idiot. :wtf:

                                  1 Reply Last reply
                                  0
                                  • Sander RosselS Sander Rossel

                                    True, but it's my most used feature of my most used IDE. And this feature works for VB, but doesn't (or at least not good enough to my taste) for C# :)

                                    It's an OO world.

                                    public class Naerling : Lazy<Person>{
                                    public void DoWork(){ throw new NotImplementedException(); }
                                    }

                                    F Offline
                                    F Offline
                                    Fabio Franco
                                    wrote on last edited by
                                    #92

                                    Naerling wrote:

                                    And this feature works for VB, but doesn't (or at least not good enough to my taste) for C# :)

                                    I have exactly the opposite opinion.

                                    "To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson "Our heads are round so our thoughts can change direction." ― Francis Picabia

                                    1 Reply Last reply
                                    0
                                    • S Simon_Whale

                                      I do love the fact that a bunch of developers including myself read this article and took it seriously, but upon reading it again I noticed this at the top of the article. Andy ‘Wise Owl’ Brown decided to write a tongue-in-cheek rant whilst he could still remember the pain-points.

                                      Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch

                                      J Offline
                                      J Offline
                                      Jorgen Andersson
                                      wrote on last edited by
                                      #93

                                      I'm glad someone noticed. :thumbsup: The reaction from most people in the forum is actually quite worrying

                                      Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

                                      1 Reply Last reply
                                      0
                                      • G Gary Wheeler

                                        I sincerely hope checked and the article is satire. If it isn't, the guy's I wrote the following because I'm an idiot: 1. Writing software well is a matter of attention to details. If you can't be arsed to even get the name of something right, you're probably going to screw up more important things. 2. If you're going to criticize a language, at least get your examples right. His C# code doesn't duplicate the logic in his VB. 3. Learn how your IDE works, moron. I can assign events in my C# code any time I like, and I'm using VS2008. 4. These are operators, which I would expect to be concise. Can you imagine writing this:

                                        proportion = openquantity openquantity a addto b addto c addto d closequantity dividedby e closequantity multipliedby 100

                                        instead of

                                        proportion = ((a + b + c + d) / e) * 100

                                        Secondly, programming is symbol manipulation. As in my response to #1, if you can't get this right, there are a whole bunch of other things you won't get right. 5. Sigh. Snippets in the IDE. The guy's like a carpenter who has to be told how to use a hammer every morning. 6. They's in the bloody CLR library. In 30 years of programming, not once have I needed to use the mortgage payment function. As far as 'is number' goes, I do localized applications. The library functions for validating localized numbers are usually inept. The .NET versions are actually pretty good, from what I've seen. They seem to work well for common number formats found in the U.S., Europe, and Asia. 7. VB's line continuation character is as annoying as Pascal's use of the semicolon as a statement separator. It's a special case you have to remember all of the time. At least with the C-style languages, you just put the semicolon at the end of every statement. Period. 8. To-may-toe, To-mah-toe. 9. VB encourages you to be sloppy. Once again, point #1. 10. C# gives you a whole lot more control over data structure transformations. With a language that encourages sloppiness, I wouldn't expect it to handle this kind of thing in a fashion that performed well.

                                        Software Zen: delete this;

                                        J Offline
                                        J Offline
                                        Jorgen Andersson
                                        wrote on last edited by
                                        #94

                                        Gary Wheeler wrote:

                                        I sincerely hope checked and the article is satire. If it isn't, the guy's I wrote the following because I'm an idiot:

                                        That just earned you a five.:thumbsup: But it means that you're in a minority in this forum. :sigh:

                                        Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

                                        1 Reply Last reply
                                        0
                                        • M Matthew Graybosch

                                          What really matters is getting paid. If I get paid the same amount per hour either way to use C# or VB, then I'll keep my preferences (C#) to myself and give the client his money's worth.

                                          When posting here, I do not represent anybody but myself.

                                          V Offline
                                          V Offline
                                          Vivi Chellappa
                                          wrote on last edited by
                                          #95

                                          Matthew Graybosch wrote:

                                          If I get paid the same amount per hour either way to use C# or VB, then I'll keep my preferences (C#) to myself and give the client his money's worth.

                                          What you get paid has nothing to do with the quality of the work, the difficulty involved or anything else. It has everything to do with how good a salesman you are and how dumb the customer is. I had a friend who was able to bill dBase IV programmers at $120 an hour (in 1996) to generate sales analysis reports. At the same time, my friend with a PhD in Computer Science was eking out $50 an hour from iCompany for writing communications code in C. And every quarter, iCompany would produce record profits and promptly cut his rate to $35 so that the next quarter's results would look even better. Do you get $120 an hour for C#? :-D PS. The story is even better. The guy who was doing dBase IV programming sold essentially the same system (with very minor modifications) to 7 different companies in Silicon Valley and so his billing rate was about 7 x $120 ($840) an hour because be billed every company all the development time for the software.

                                          M 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