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. General Programming
  3. C#
  4. Ok, now it's my turn to complain about C#

Ok, now it's my turn to complain about C#

Scheduled Pinned Locked Moved C#
csharpquestioncomlinux
18 Posts 8 Posters 0 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 Offline
    R Offline
    Ray Cassick
    wrote on last edited by
    #1

    I always hear how VB is soooo verbose and sooooo hard on the eyes... Well I have had it with C# this week. Please explain to me why in the VB.Net code editor you can select a control on a form from the drop down box on the left and then select the method, etc... that you want to write code for from the drop down on the right and get the shell of the code built for you in the code window, or be taken to where it already exists. ...but in C# all you see in the left drop down in the current parent object that you are in (IE: class, form, etc…) and the right drop down box either only shows you a listing of controls on that form, or methods of the class, but NOT a listing of controls placed on the form? I don’t get it. What is wrong with the way the VB editor works? You C# guys need to declare a delegate and attach it to a control, blah blah blah... All the VB person has to do is select and click and we get the darn code done for us. Oh yeah, and before you start yelling about connecting multiple handlers to an event, all I have to do in VB is add a Handles clause to the end of my event handler to attach the other control(s) and if I am good, I also modify the name of the method to be more generic, and I am DONE! Grrrrrrrrrr Done venting now...


    LinkedIn[^] | Blog[^] | Twitter[^]

    P G P _ 5 Replies Last reply
    0
    • R Ray Cassick

      I always hear how VB is soooo verbose and sooooo hard on the eyes... Well I have had it with C# this week. Please explain to me why in the VB.Net code editor you can select a control on a form from the drop down box on the left and then select the method, etc... that you want to write code for from the drop down on the right and get the shell of the code built for you in the code window, or be taken to where it already exists. ...but in C# all you see in the left drop down in the current parent object that you are in (IE: class, form, etc…) and the right drop down box either only shows you a listing of controls on that form, or methods of the class, but NOT a listing of controls placed on the form? I don’t get it. What is wrong with the way the VB editor works? You C# guys need to declare a delegate and attach it to a control, blah blah blah... All the VB person has to do is select and click and we get the darn code done for us. Oh yeah, and before you start yelling about connecting multiple handlers to an event, all I have to do in VB is add a Handles clause to the end of my event handler to attach the other control(s) and if I am good, I also modify the name of the method to be more generic, and I am DONE! Grrrrrrrrrr Done venting now...


      LinkedIn[^] | Blog[^] | Twitter[^]

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

      Are you still using the old crap way of event handling? Haven't you heard of weak events? Oh wait "Handles" doesn't handle that. ;P

      I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

      Forgive your enemies - it messes with their heads

      My blog | My articles | MoXAML PowerToys | Onyx

      R 1 Reply Last reply
      0
      • R Ray Cassick

        I always hear how VB is soooo verbose and sooooo hard on the eyes... Well I have had it with C# this week. Please explain to me why in the VB.Net code editor you can select a control on a form from the drop down box on the left and then select the method, etc... that you want to write code for from the drop down on the right and get the shell of the code built for you in the code window, or be taken to where it already exists. ...but in C# all you see in the left drop down in the current parent object that you are in (IE: class, form, etc…) and the right drop down box either only shows you a listing of controls on that form, or methods of the class, but NOT a listing of controls placed on the form? I don’t get it. What is wrong with the way the VB editor works? You C# guys need to declare a delegate and attach it to a control, blah blah blah... All the VB person has to do is select and click and we get the darn code done for us. Oh yeah, and before you start yelling about connecting multiple handlers to an event, all I have to do in VB is add a Handles clause to the end of my event handler to attach the other control(s) and if I am good, I also modify the name of the method to be more generic, and I am DONE! Grrrrrrrrrr Done venting now...


        LinkedIn[^] | Blog[^] | Twitter[^]

        G Offline
        G Offline
        Giorgio Orizio
        wrote on last edited by
        #3

        Totally agree. Although I'm using more C# than VB.NET I totally agree with Ray, VB.NET editor is superior as far as helping you with the code. It also shows a comprehensive list of events implemented for that particular control. Not to mention the right arguments types for the event handler.

        1 Reply Last reply
        0
        • P Pete OHanlon

          Are you still using the old crap way of event handling? Haven't you heard of weak events? Oh wait "Handles" doesn't handle that. ;P

          I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

          Forgive your enemies - it messes with their heads

          My blog | My articles | MoXAML PowerToys | Onyx

          R Offline
          R Offline
          Ray Cassick
          wrote on last edited by
          #4

          Talk about 'weak events'... I think that pun qualifies :)


          LinkedIn[^] | Blog[^] | Twitter[^]

          1 Reply Last reply
          0
          • R Ray Cassick

            I always hear how VB is soooo verbose and sooooo hard on the eyes... Well I have had it with C# this week. Please explain to me why in the VB.Net code editor you can select a control on a form from the drop down box on the left and then select the method, etc... that you want to write code for from the drop down on the right and get the shell of the code built for you in the code window, or be taken to where it already exists. ...but in C# all you see in the left drop down in the current parent object that you are in (IE: class, form, etc…) and the right drop down box either only shows you a listing of controls on that form, or methods of the class, but NOT a listing of controls placed on the form? I don’t get it. What is wrong with the way the VB editor works? You C# guys need to declare a delegate and attach it to a control, blah blah blah... All the VB person has to do is select and click and we get the darn code done for us. Oh yeah, and before you start yelling about connecting multiple handlers to an event, all I have to do in VB is add a Handles clause to the end of my event handler to attach the other control(s) and if I am good, I also modify the name of the method to be more generic, and I am DONE! Grrrrrrrrrr Done venting now...


            LinkedIn[^] | Blog[^] | Twitter[^]

            P Online
            P Online
            PIEBALDconsult
            wrote on last edited by
            #5

            Ray Cassick wrote:

            drop down box on the left

            Ray Cassick wrote:

            left drop down

            Ray Cassick wrote:

            right drop down box

            Ray Cassick wrote:

            a listing of controls placed on the form

            Umm, what? I don't follow. Any VB can do, C# can do better.

            L 1 Reply Last reply
            0
            • P PIEBALDconsult

              Ray Cassick wrote:

              drop down box on the left

              Ray Cassick wrote:

              left drop down

              Ray Cassick wrote:

              right drop down box

              Ray Cassick wrote:

              a listing of controls placed on the form

              Umm, what? I don't follow. Any VB can do, C# can do better.

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              well, there are a couple of differences in the way Visual Studio helps the programmer. In VB.NET the class drop-down (on top of the source edit windows) shows its content hierarchically, so one sees a list of the controls, in C# it doesn't do that, it behaves like a simple ComboBox. Maybe the designers just had some spare time or they thought the VB people needed more help? :)

              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

              Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

              D R P 4 Replies Last reply
              0
              • L Luc Pattyn

                well, there are a couple of differences in the way Visual Studio helps the programmer. In VB.NET the class drop-down (on top of the source edit windows) shows its content hierarchically, so one sees a list of the controls, in C# it doesn't do that, it behaves like a simple ComboBox. Maybe the designers just had some spare time or they thought the VB people needed more help? :)

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                D Offline
                D Offline
                Dr Walt Fair PE
                wrote on last edited by
                #7

                Luc Pattyn wrote:

                ... or they thought the VB people needed more help?

                I think you're on to something, Luc. I've never had problems finding methods and events in C# and never used the drop down in VB.

                CQ de W5ALT

                Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                1 Reply Last reply
                0
                • L Luc Pattyn

                  well, there are a couple of differences in the way Visual Studio helps the programmer. In VB.NET the class drop-down (on top of the source edit windows) shows its content hierarchically, so one sees a list of the controls, in C# it doesn't do that, it behaves like a simple ComboBox. Maybe the designers just had some spare time or they thought the VB people needed more help? :)

                  Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                  Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                  R Offline
                  R Offline
                  Ray Cassick
                  wrote on last edited by
                  #8

                  Typical...


                  LinkedIn[^] | Blog[^] | Twitter[^]

                  M 1 Reply Last reply
                  0
                  • R Ray Cassick

                    Typical...


                    LinkedIn[^] | Blog[^] | Twitter[^]

                    M Offline
                    M Offline
                    Mycroft Holmes
                    wrote on last edited by
                    #9

                    I only recently changed to C# but was not even aware of the IDE capability, then again I am continually amazed at the shortcuts that I don't know of. Just vetting the way another programmer does their work reveals little insights all the time.

                    Never underestimate the power of human stupidity RAH

                    1 Reply Last reply
                    0
                    • L Luc Pattyn

                      well, there are a couple of differences in the way Visual Studio helps the programmer. In VB.NET the class drop-down (on top of the source edit windows) shows its content hierarchically, so one sees a list of the controls, in C# it doesn't do that, it behaves like a simple ComboBox. Maybe the designers just had some spare time or they thought the VB people needed more help? :)

                      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                      Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                      P Online
                      P Online
                      PIEBALDconsult
                      wrote on last edited by
                      #10

                      So, not like the alphabetical list at the top of the Properties pane? Which I hardly ever use?

                      1 Reply Last reply
                      0
                      • R Ray Cassick

                        I always hear how VB is soooo verbose and sooooo hard on the eyes... Well I have had it with C# this week. Please explain to me why in the VB.Net code editor you can select a control on a form from the drop down box on the left and then select the method, etc... that you want to write code for from the drop down on the right and get the shell of the code built for you in the code window, or be taken to where it already exists. ...but in C# all you see in the left drop down in the current parent object that you are in (IE: class, form, etc…) and the right drop down box either only shows you a listing of controls on that form, or methods of the class, but NOT a listing of controls placed on the form? I don’t get it. What is wrong with the way the VB editor works? You C# guys need to declare a delegate and attach it to a control, blah blah blah... All the VB person has to do is select and click and we get the darn code done for us. Oh yeah, and before you start yelling about connecting multiple handlers to an event, all I have to do in VB is add a Handles clause to the end of my event handler to attach the other control(s) and if I am good, I also modify the name of the method to be more generic, and I am DONE! Grrrrrrrrrr Done venting now...


                        LinkedIn[^] | Blog[^] | Twitter[^]

                        _ Offline
                        _ Offline
                        _Erik_
                        wrote on last edited by
                        #11

                        I guess you can't blame the language. If the C# editor lacks some features, you should blame the editor. Both languages are different, with pros and cons. I prefer C# for almost everything, but I still use VB for some very concrete things which result easier than in C#.

                        R 1 Reply Last reply
                        0
                        • L Luc Pattyn

                          well, there are a couple of differences in the way Visual Studio helps the programmer. In VB.NET the class drop-down (on top of the source edit windows) shows its content hierarchically, so one sees a list of the controls, in C# it doesn't do that, it behaves like a simple ComboBox. Maybe the designers just had some spare time or they thought the VB people needed more help? :)

                          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                          Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                          P Online
                          P Online
                          PIEBALDconsult
                          wrote on last edited by
                          #12

                          I finally got around to creating a WinForms solution (VS2008) in VB.net and I don't see what you're talking about -- it looks pretty much the same as a C# solution; except C# solutions/projects don't hide files from me.

                          L 1 Reply Last reply
                          0
                          • P PIEBALDconsult

                            I finally got around to creating a WinForms solution (VS2008) in VB.net and I don't see what you're talking about -- it looks pretty much the same as a C# solution; except C# solutions/projects don't hide files from me.

                            L Offline
                            L Offline
                            Luc Pattyn
                            wrote on last edited by
                            #13

                            if it is a WinForm project, add some Controls to the Form, and they appear in the drop-down at the top left of the edit window in VB.NET, they don't in C# (I'm using Express Editions here). VB.NET Express hides files by default, clicking one of the buttons above the solution pane remedies that. :)

                            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                            Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                            P 1 Reply Last reply
                            0
                            • L Luc Pattyn

                              if it is a WinForm project, add some Controls to the Form, and they appear in the drop-down at the top left of the edit window in VB.NET, they don't in C# (I'm using Express Editions here). VB.NET Express hides files by default, clicking one of the buttons above the solution pane remedies that. :)

                              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                              Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                              P Online
                              P Online
                              PIEBALDconsult
                              wrote on last edited by
                              #14

                              Luc Pattyn wrote:

                              add some Controls to the Form

                              Yep, did that.

                              Luc Pattyn wrote:

                              and they appear in the drop-down at the top left of the edit window in VB.NET

                              I don't see it... ohhh... that. I don't usually have the Navigation Bar (never heard of it before now) turned on in C#; it seems fairly pointless, trying it on for size now. Yeah pointless, only useful if you define multiple classes in one file -- which you shouldn't do. And they don't let you turn off the Navigation Bar in VB?! :wtf:

                              L 1 Reply Last reply
                              0
                              • P PIEBALDconsult

                                Luc Pattyn wrote:

                                add some Controls to the Form

                                Yep, did that.

                                Luc Pattyn wrote:

                                and they appear in the drop-down at the top left of the edit window in VB.NET

                                I don't see it... ohhh... that. I don't usually have the Navigation Bar (never heard of it before now) turned on in C#; it seems fairly pointless, trying it on for size now. Yeah pointless, only useful if you define multiple classes in one file -- which you shouldn't do. And they don't let you turn off the Navigation Bar in VB?! :wtf:

                                L Offline
                                L Offline
                                Luc Pattyn
                                wrote on last edited by
                                #15

                                I typically have only one class in a file, and I only use the righthand drop-down, which lists methods and properties. That is quite useful IMO. I don't remember having ever changed the setting about nav bars, and they are present for me both in VB.NET and C# (Express!) :)

                                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                                Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                                1 Reply Last reply
                                0
                                • R Ray Cassick

                                  I always hear how VB is soooo verbose and sooooo hard on the eyes... Well I have had it with C# this week. Please explain to me why in the VB.Net code editor you can select a control on a form from the drop down box on the left and then select the method, etc... that you want to write code for from the drop down on the right and get the shell of the code built for you in the code window, or be taken to where it already exists. ...but in C# all you see in the left drop down in the current parent object that you are in (IE: class, form, etc…) and the right drop down box either only shows you a listing of controls on that form, or methods of the class, but NOT a listing of controls placed on the form? I don’t get it. What is wrong with the way the VB editor works? You C# guys need to declare a delegate and attach it to a control, blah blah blah... All the VB person has to do is select and click and we get the darn code done for us. Oh yeah, and before you start yelling about connecting multiple handlers to an event, all I have to do in VB is add a Handles clause to the end of my event handler to attach the other control(s) and if I am good, I also modify the name of the method to be more generic, and I am DONE! Grrrrrrrrrr Done venting now...


                                  LinkedIn[^] | Blog[^] | Twitter[^]

                                  P Online
                                  P Online
                                  PIEBALDconsult
                                  wrote on last edited by
                                  #16

                                  Ray Cassick wrote:

                                  get the shell of the code built for you

                                  Either by double-clicking the control in the designer or by selecting an event from the properties pane.

                                  R 1 Reply Last reply
                                  0
                                  • P PIEBALDconsult

                                    Ray Cassick wrote:

                                    get the shell of the code built for you

                                    Either by double-clicking the control in the designer or by selecting an event from the properties pane.

                                    R Offline
                                    R Offline
                                    Ray Cassick
                                    wrote on last edited by
                                    #17

                                    Yeah, now see... that to me is an oddity... Just double-clicking in the control provides you with a default event handler (in all honesty just like the VB editor does the same thing) but to get a handler for a different event you need to then go over to where the properties window is, select the button to display the events available, find the event type you want in the list and click it to see it. Yes, I agree that you CAN ALSO do the same thing in a VB project. I am just aggravated that for a company that tries to preach visual and usability consistency in their documentation, they go and do this. They made the UI for a C# code editor window and a VB code editor window behave in different ways. WHY? Trust me, I am in no way slamming C#. I LIKE the language. It’s fine for when I use it, and it gets the job done. YES, my first choice is to use VB if I can, JUST because I am used to it over the years, but I can play in both areas just fine code/concept wise. It just aggravates me that in this day and age MS is still not following their design philosophies. Surprised? No. Aggravated? Yes. Something as basic as the organization of a code editor window, in my opinion, should be a standard that the developers HAVE to follow. It would be stupid to expect a VB developer to use Ctrl+C for the copy command and then expect the C# developer to use a different command right? In fact it is against every tenant that MS establishes, but they STILL allow this kind of junk to happen within their own development teams. Maybe the C# devs feel the ‘VB way’ of doing it is stupid or childish, or inefficient, or whatever, but the simple fact is that MS obviously little control over what their devs implement and this shows it. Here we are, VS2010 and we still see creepy differences like this. I wonder if Eclipse or SharpDevelop have inconsistencies like this?


                                    LinkedIn[^] | Blog[^] | Twitter[^]

                                    1 Reply Last reply
                                    0
                                    • _ _Erik_

                                      I guess you can't blame the language. If the C# editor lacks some features, you should blame the editor. Both languages are different, with pros and cons. I prefer C# for almost everything, but I still use VB for some very concrete things which result easier than in C#.

                                      R Offline
                                      R Offline
                                      Ray Cassick
                                      wrote on last edited by
                                      #18

                                      Agreed... I have no problems with C#. I use it all the time. I just am aggravated with the inconsistencies of the editor. It’s not the languages fault, and I didn’t intend for it to sound like that. See my reply below to PIEBALDconsult about what I am really ticked at here…


                                      LinkedIn[^] | Blog[^] | Twitter[^]

                                      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