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. Why VB.Net blah blah... [modified]

Why VB.Net blah blah... [modified]

Scheduled Pinned Locked Moved The Lounge
csharp
70 Posts 44 Posters 26 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 realJSOP

    I wasn't ready for this:

    Dim [step] as String

    I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

    .45 ACP - because shooting twice is just silly
    -----
    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
    -----
    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

    modified on Thursday, November 18, 2010 9:55 AM

    N Offline
    N Offline
    Nemanja Trifunovic
    wrote on last edited by
    #11

    Potato, pothato:

    string @int = "Hi, John";

    utf8-cpp

    R G 2 Replies Last reply
    0
    • H Henry Minute

      C# also allows this.

      The prefix "@" enables the use of keywords as identifiers, which is useful when interfacing with other programming languages. The character @ is not actually part of the identifier, so the identifier might be seen in other languages as a normal identifier, without the prefix. An identifier with an @ prefix is called a verbatim identifier. Use of the @ prefix for identifiers that are not keywords is permitted, but strongly discouraged as a matter of style.

      from MSDN[^].

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      R Offline
      R Offline
      realJSOP
      wrote on last edited by
      #12

      It would never even cross my mind to do that. "Strongly discouraged"? It's more like a killing offense.

      .45 ACP - because shooting twice is just silly
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

      H 1 Reply Last reply
      0
      • R realJSOP

        It would never even cross my mind to do that. "Strongly discouraged"? It's more like a killing offense.

        .45 ACP - because shooting twice is just silly
        -----
        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

        H Offline
        H Offline
        Henry Minute
        wrote on last edited by
        #13

        Agreed!

        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

        D 1 Reply Last reply
        0
        • N Nemanja Trifunovic

          Potato, pothato:

          string @int = "Hi, John";

          utf8-cpp

          R Offline
          R Offline
          realJSOP
          wrote on last edited by
          #14

          Yeah - like I said, it would never even cross my mind to do soemthing like that. It's just stupid.

          .45 ACP - because shooting twice is just silly
          -----
          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
          -----
          "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

          S 1 Reply Last reply
          0
          • R realJSOP

            I wasn't ready for this:

            Dim [step] as String

            I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

            .45 ACP - because shooting twice is just silly
            -----
            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

            modified on Thursday, November 18, 2010 9:55 AM

            D Offline
            D Offline
            Dave Parker
            wrote on last edited by
            #15

            It could be worse, at least you're not having to rewrite in VB6.

            1 Reply Last reply
            0
            • R realJSOP

              I wasn't ready for this:

              Dim [step] as String

              I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

              .45 ACP - because shooting twice is just silly
              -----
              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

              modified on Thursday, November 18, 2010 9:55 AM

              C Offline
              C Offline
              Chris Losinger
              wrote on last edited by
              #16

              SQL allows that, too. SELECT [Date] FROM History

              image processing toolkits | batch image processing

              R 1 Reply Last reply
              0
              • R realJSOP

                I wasn't ready for this:

                Dim [step] as String

                I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

                .45 ACP - because shooting twice is just silly
                -----
                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                modified on Thursday, November 18, 2010 9:55 AM

                R Offline
                R Offline
                Rama Krishna Vavilala
                wrote on last edited by
                #17

                John Simmons / outlaw programmer wrote:

                but amazingly bad practice...

                For manual code, yes! However, this feature is extremely useful for generative programming (where your code generates code based on user inputs, compiles it and runs it) Thankfully, this feature is supported in both C# and VB.

                R 1 Reply Last reply
                0
                • R Rama Krishna Vavilala

                  John Simmons / outlaw programmer wrote:

                  but amazingly bad practice...

                  For manual code, yes! However, this feature is extremely useful for generative programming (where your code generates code based on user inputs, compiles it and runs it) Thankfully, this feature is supported in both C# and VB.

                  R Offline
                  R Offline
                  realJSOP
                  wrote on last edited by
                  #18

                  Rama Krishna Vavilala wrote:

                  For manual code, yes!

                  For ANY code - yes. It's like using goto. Just because you *can* use it doesn't mean you *should*.

                  .45 ACP - because shooting twice is just silly
                  -----
                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                  -----
                  "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                  R S 2 Replies Last reply
                  0
                  • C Chris Losinger

                    SQL allows that, too. SELECT [Date] FROM History

                    image processing toolkits | batch image processing

                    R Offline
                    R Offline
                    realJSOP
                    wrote on last edited by
                    #19

                    Yeah, and I hate it there, too. I'm not a fan of SQl either, as long as we're on the topic.

                    .45 ACP - because shooting twice is just silly
                    -----
                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                    -----
                    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                    1 Reply Last reply
                    0
                    • R realJSOP

                      Rama Krishna Vavilala wrote:

                      For manual code, yes!

                      For ANY code - yes. It's like using goto. Just because you *can* use it doesn't mean you *should*.

                      .45 ACP - because shooting twice is just silly
                      -----
                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                      -----
                      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                      R Offline
                      R Offline
                      Rama Krishna Vavilala
                      wrote on last edited by
                      #20

                      It's like saying that assembler should not use jump statements or certain constructs. When you are auto-generating code which is not supposed to be read by anyone (sort of like ASP.NET does) this feature works well. The neat thing is that codedom automatically takes care of this.

                      J 1 Reply Last reply
                      0
                      • R realJSOP

                        Rama Krishna Vavilala wrote:

                        For manual code, yes!

                        For ANY code - yes. It's like using goto. Just because you *can* use it doesn't mean you *should*.

                        .45 ACP - because shooting twice is just silly
                        -----
                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                        -----
                        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                        S Offline
                        S Offline
                        Simon_Whale
                        wrote on last edited by
                        #21

                        John Simmons / outlaw programmer wrote:

                        Just because you *can* use it doesn't mean you *should*.

                        Best advice ever!

                        As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

                        1 Reply Last reply
                        0
                        • R realJSOP

                          I wasn't ready for this:

                          Dim [step] as String

                          I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

                          .45 ACP - because shooting twice is just silly
                          -----
                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                          -----
                          "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                          modified on Thursday, November 18, 2010 9:55 AM

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

                          Ahhh yes, cricket. Such things happen so you can learn humility. OTOH, at least you're not using FORTRAN or COBOL! BTW, I'm a slow learner.

                          CQ de W5ALT

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

                          1 Reply Last reply
                          0
                          • D Dalek Dave

                            John Simmons / outlaw programmer wrote:

                            VB is a scurge on mankind

                            Scourge, surely?

                            ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC League Table Link CCC Link[^]

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

                            You do realize that correcting John's spelling when he's pissed about something is about as safe as telling Chuck Norris to keep off the grass?

                            Software Zen: delete this;

                            D 1 Reply Last reply
                            0
                            • N Nemanja Trifunovic

                              Potato, pothato:

                              string @int = "Hi, John";

                              utf8-cpp

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

                              There is no conceivable reason whatsoever to do such a thing. If I found my minion pulling a trick like that, I would leave his head mounted on a pike outside the castle wall as a warning to the applicants to assume his position.

                              Software Zen: delete this;

                              R S 2 Replies Last reply
                              0
                              • R realJSOP

                                I wasn't ready for this:

                                Dim [step] as String

                                I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

                                .45 ACP - because shooting twice is just silly
                                -----
                                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                -----
                                "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                modified on Thursday, November 18, 2010 9:55 AM

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

                                almost any 3, 4 or 5-letter combination is a keyword in VB. Without this feature you would be restricted to 1- and 2-letter identifiers, and really long ones. :)

                                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
                                • G Gary Wheeler

                                  There is no conceivable reason whatsoever to do such a thing. If I found my minion pulling a trick like that, I would leave his head mounted on a pike outside the castle wall as a warning to the applicants to assume his position.

                                  Software Zen: delete this;

                                  R Offline
                                  R Offline
                                  realJSOP
                                  wrote on last edited by
                                  #26

                                  I have a strong feeling that you and I are so much alike that we could almost finish each other's sentences.

                                  .45 ACP - because shooting twice is just silly
                                  -----
                                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                  -----
                                  "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                  1 Reply Last reply
                                  0
                                  • R realJSOP

                                    I wasn't ready for this:

                                    Dim [step] as String

                                    I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

                                    .45 ACP - because shooting twice is just silly
                                    -----
                                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                    -----
                                    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                    modified on Thursday, November 18, 2010 9:55 AM

                                    Steve EcholsS Offline
                                    Steve EcholsS Offline
                                    Steve Echols
                                    wrote on last edited by
                                    #27

                                    I also have to port stuff from C# to VB ( :( ): Public Enum Status Success Warning [Error] End Enum Without the [], I would have to name Error something else (Fubar comes to mind), and change every piece of code that uses it.


                                    - S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.

                                    • S
                                      50 cups of coffee and you know it's on!
                                      Code, follow, or get out of the way.
                                    1 Reply Last reply
                                    0
                                    • G Gary Wheeler

                                      You do realize that correcting John's spelling when he's pissed about something is about as safe as telling Chuck Norris to keep off the grass?

                                      Software Zen: delete this;

                                      D Offline
                                      D Offline
                                      Dan Neely
                                      wrote on last edited by
                                      #28

                                      Gary Wheeler wrote:

                                      You do realize that correcting John's spelling when he's pissed about something is about as safe as telling Chuck Norris to keep off the grass?

                                      Actually it's less safe. You can do the latter safely if you word it right, just ask him to one up Jesus by walking on air. :laugh:

                                      3x12=36 2x12=24 1x12=12 0x12=18

                                      1 Reply Last reply
                                      0
                                      • R realJSOP

                                        I wasn't ready for this:

                                        Dim [step] as String

                                        I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

                                        .45 ACP - because shooting twice is just silly
                                        -----
                                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                        -----
                                        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                        modified on Thursday, November 18, 2010 9:55 AM

                                        M Offline
                                        M Offline
                                        Member 96
                                        wrote on last edited by
                                        #29

                                        You sir are living in your own personal hell, my condolences. :)


                                        “If you want to build a ship, don't drum up people together to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea” - Antoine de Saint-Exupery

                                        1 Reply Last reply
                                        0
                                        • R realJSOP

                                          I'm using a web site that converts. For the most part, it does an okay job, but Linq statements tend to freak it out. I have a LOT of linq statements. I hate pretty much everything about VB, so this makes me hate my job. I updated my resume last night. I think my boss doesn't want to learn C#. I recognize that VB abnd C# are pretty much the same, but the differences are infuriating, and I simply don't like coding in it. NOTHING will change my outlook regarding VB. It has no redeeming features.

                                          .45 ACP - because shooting twice is just silly
                                          -----
                                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                          -----
                                          "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

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

                                          John Simmons / outlaw programmer wrote:

                                          think my boss doesn't want to learn C#

                                          That was the complaint I got from my boss when I moved the teams to c#. We still support the VB apps but at least the move stuck. I have too many years making a living with VB to bitch about it. Just another tool as far as I care.

                                          Never underestimate the power of human stupidity RAH

                                          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