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. Who wrote the "suggestions" part of VS 2019?

Who wrote the "suggestions" part of VS 2019?

Scheduled Pinned Locked Moved The Lounge
csharpvisual-studiocomxmlhelp
21 Posts 16 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.
  • OriginalGriffO Offline
    OriginalGriffO Offline
    OriginalGriff
    wrote on last edited by
    #1

    And how did they escape from kindergarten? This time, my code looks like this:

            XmlDocument xd = new XmlDocument();
            xd.Load(@"D:\\Test Data\\author.xml");
            xd.PreserveWhitespace = true;
    

    And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

    1. Introduce a constant for "true"
    2. Introduce a constant for all occurrences of "true"
    3. Introduce a local constant for "true"
    4. Introduce a local constant for all occurrences of "true"

    That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

    Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

    S Kornfeld Eliyahu PeterK W F N 12 Replies Last reply
    0
    • OriginalGriffO OriginalGriff

      And how did they escape from kindergarten? This time, my code looks like this:

              XmlDocument xd = new XmlDocument();
              xd.Load(@"D:\\Test Data\\author.xml");
              xd.PreserveWhitespace = true;
      

      And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

      1. Introduce a constant for "true"
      2. Introduce a constant for all occurrences of "true"
      3. Introduce a local constant for "true"
      4. Introduce a local constant for all occurrences of "true"

      That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

      Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

      S Offline
      S Offline
      Super Lloyd
      wrote on last edited by
      #2

      Well... I know many developer who seem to think the same.... :o

      A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

      1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        And how did they escape from kindergarten? This time, my code looks like this:

                XmlDocument xd = new XmlDocument();
                xd.Load(@"D:\\Test Data\\author.xml");
                xd.PreserveWhitespace = true;
        

        And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

        1. Introduce a constant for "true"
        2. Introduce a constant for all occurrences of "true"
        3. Introduce a local constant for "true"
        4. Introduce a local constant for all occurrences of "true"

        That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

        Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

        Kornfeld Eliyahu PeterK Offline
        Kornfeld Eliyahu PeterK Offline
        Kornfeld Eliyahu Peter
        wrote on last edited by
        #3

        To be precise 'true' is not a constant in C# - So VS is right, you have not such thing as 'true' constant so you may as well spend your time more creatively than writing that stupid code and create one... and while you are at it do it globally...

        "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

        "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

        1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          And how did they escape from kindergarten? This time, my code looks like this:

                  XmlDocument xd = new XmlDocument();
                  xd.Load(@"D:\\Test Data\\author.xml");
                  xd.PreserveWhitespace = true;
          

          And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

          1. Introduce a constant for "true"
          2. Introduce a constant for all occurrences of "true"
          3. Introduce a local constant for "true"
          4. Introduce a local constant for all occurrences of "true"

          That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

          Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

          W Offline
          W Offline
          W Balboos GHB
          wrote on last edited by
          #4

          Your question is easily answered. Consider the times we live in. The staff, more and more, will consist of people who's life is bound to a small hand-held device. The device, in it's most evil state, is used to transmit messages in non-English (FWIW, u c). So - this is the natural evolution of what's to come. Besides - as is their entire way of life, if you don't know something . . . Google it! It's much easier than learning anything. And now, with your question answered, you can enjoy a fine beverage.

          Ravings en masse^

          "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

          "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

          1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            And how did they escape from kindergarten? This time, my code looks like this:

                    XmlDocument xd = new XmlDocument();
                    xd.Load(@"D:\\Test Data\\author.xml");
                    xd.PreserveWhitespace = true;
            

            And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

            1. Introduce a constant for "true"
            2. Introduce a constant for all occurrences of "true"
            3. Introduce a local constant for "true"
            4. Introduce a local constant for all occurrences of "true"

            That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

            Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

            F Offline
            F Offline
            F ES Sitecore
            wrote on last edited by
            #5
            1. public const bool True = false; public const bool False = true; 2) update code base 3) leave job
            S 1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              And how did they escape from kindergarten? This time, my code looks like this:

                      XmlDocument xd = new XmlDocument();
                      xd.Load(@"D:\\Test Data\\author.xml");
                      xd.PreserveWhitespace = true;
              

              And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

              1. Introduce a constant for "true"
              2. Introduce a constant for all occurrences of "true"
              3. Introduce a local constant for "true"
              4. Introduce a local constant for all occurrences of "true"

              That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

              Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

              N Offline
              N Offline
              Nelek
              wrote on last edited by
              #6

              Have you tried "TRUE" instead of "true"? ;)

              M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

              1 Reply Last reply
              0
              • OriginalGriffO OriginalGriff

                And how did they escape from kindergarten? This time, my code looks like this:

                        XmlDocument xd = new XmlDocument();
                        xd.Load(@"D:\\Test Data\\author.xml");
                        xd.PreserveWhitespace = true;
                

                And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

                1. Introduce a constant for "true"
                2. Introduce a constant for all occurrences of "true"
                3. Introduce a local constant for "true"
                4. Introduce a local constant for all occurrences of "true"

                That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

                Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

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

                Solution - turn off the code suggestions feature

                ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                -----
                You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                -----
                When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                R 1 Reply Last reply
                0
                • OriginalGriffO OriginalGriff

                  And how did they escape from kindergarten? This time, my code looks like this:

                          XmlDocument xd = new XmlDocument();
                          xd.Load(@"D:\\Test Data\\author.xml");
                          xd.PreserveWhitespace = true;
                  

                  And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

                  1. Introduce a constant for "true"
                  2. Introduce a constant for all occurrences of "true"
                  3. Introduce a local constant for "true"
                  4. Introduce a local constant for all occurrences of "true"

                  That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

                  Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                  D Offline
                  D Offline
                  Daniel Pfeffer
                  wrote on last edited by
                  #8

                  But what is "true"? Is your "true" the same as mine?

                  Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                  1 Reply Last reply
                  0
                  • F F ES Sitecore
                    1. public const bool True = false; public const bool False = true; 2) update code base 3) leave job
                    S Offline
                    S Offline
                    Super Lloyd
                    wrote on last edited by
                    #9

                    Wait! there is more!

                    public static readonly bool Maybe = new Rand().Next(2) == 0;

                    A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

                    F D 2 Replies Last reply
                    0
                    • S Super Lloyd

                      Wait! there is more!

                      public static readonly bool Maybe = new Rand().Next(2) == 0;

                      A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

                      F Offline
                      F Offline
                      F ES Sitecore
                      wrote on last edited by
                      #10

                      I'm a bad person....you're just evil :laugh:

                      F 1 Reply Last reply
                      0
                      • OriginalGriffO OriginalGriff

                        And how did they escape from kindergarten? This time, my code looks like this:

                                XmlDocument xd = new XmlDocument();
                                xd.Load(@"D:\\Test Data\\author.xml");
                                xd.PreserveWhitespace = true;
                        

                        And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

                        1. Introduce a constant for "true"
                        2. Introduce a constant for all occurrences of "true"
                        3. Introduce a local constant for "true"
                        4. Introduce a local constant for all occurrences of "true"

                        That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

                        Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                        M Offline
                        M Offline
                        Marc Clifton
                        wrote on last edited by
                        #11

                        They're just trying to help Javascript programmers integrate into the .NET community. Coming from "falsey" and "truthy" to hard false and true can be quite traumatic! :laugh:

                        Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                        OriginalGriffO 1 Reply Last reply
                        0
                        • M Marc Clifton

                          They're just trying to help Javascript programmers integrate into the .NET community. Coming from "falsey" and "truthy" to hard false and true can be quite traumatic! :laugh:

                          Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                          OriginalGriffO Offline
                          OriginalGriffO Offline
                          OriginalGriff
                          wrote on last edited by
                          #12

                          I remember one FORTRAN programmer that didn't trust 'em. He used to write code like this:

                          if (a == b)
                          ...
                          else if (a != b)
                          ...
                          else
                          ...

                          :sigh:

                          Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                          F 1 Reply Last reply
                          0
                          • F F ES Sitecore

                            I'm a bad person....you're just evil :laugh:

                            F Offline
                            F Offline
                            Forogar
                            wrote on last edited by
                            #13

                            I believe that should be "Dr. Evil". ;)

                            - I would love to change the world, but they won’t give me the source code.

                            1 Reply Last reply
                            0
                            • OriginalGriffO OriginalGriff

                              I remember one FORTRAN programmer that didn't trust 'em. He used to write code like this:

                              if (a == b)
                              ...
                              else if (a != b)
                              ...
                              else
                              ...

                              :sigh:

                              Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                              F Offline
                              F Offline
                              Forogar
                              wrote on last edited by
                              #14

                              Yeah! So I was a bit paranoid. So what!

                              - I would love to change the world, but they won’t give me the source code.

                              1 Reply Last reply
                              0
                              • OriginalGriffO OriginalGriff

                                And how did they escape from kindergarten? This time, my code looks like this:

                                        XmlDocument xd = new XmlDocument();
                                        xd.Load(@"D:\\Test Data\\author.xml");
                                        xd.PreserveWhitespace = true;
                                

                                And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

                                1. Introduce a constant for "true"
                                2. Introduce a constant for all occurrences of "true"
                                3. Introduce a local constant for "true"
                                4. Introduce a local constant for all occurrences of "true"

                                That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

                                Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                M Offline
                                M Offline
                                Marco Bertschi
                                wrote on last edited by
                                #15

                                Yeah, well.. It's up to you what you're going to use a screwdriver for. If you decide to clean your windows with it it is your own fault. If they'd know that their suggestion is right it would become a compiler error anyways.

                                I only have a signature in order to let @DalekDave follow my posts.

                                1 Reply Last reply
                                0
                                • OriginalGriffO OriginalGriff

                                  And how did they escape from kindergarten? This time, my code looks like this:

                                          XmlDocument xd = new XmlDocument();
                                          xd.Load(@"D:\\Test Data\\author.xml");
                                          xd.PreserveWhitespace = true;
                                  

                                  And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

                                  1. Introduce a constant for "true"
                                  2. Introduce a constant for all occurrences of "true"
                                  3. Introduce a local constant for "true"
                                  4. Introduce a local constant for all occurrences of "true"

                                  That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

                                  Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                  R Offline
                                  R Offline
                                  Ron Anders
                                  wrote on last edited by
                                  #16

                                  As millennials populate overseer positions with even younger ones under them, critical and "non critical" system failures will increasingly become more and more, the norm. like elevators and medical care. We're done for.

                                  1 Reply Last reply
                                  0
                                  • R realJSOP

                                    Solution - turn off the code suggestions feature

                                    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                    -----
                                    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                    -----
                                    When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                                    R Offline
                                    R Offline
                                    Rob Philpott
                                    wrote on last edited by
                                    #17

                                    Exactly. And much of Resharper too. There's enough nanny state in the real world without it appearing in your IDE as well.

                                    Regards, Rob Philpott.

                                    1 Reply Last reply
                                    0
                                    • OriginalGriffO OriginalGriff

                                      And how did they escape from kindergarten? This time, my code looks like this:

                                              XmlDocument xd = new XmlDocument();
                                              xd.Load(@"D:\\Test Data\\author.xml");
                                              xd.PreserveWhitespace = true;
                                      

                                      And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

                                      1. Introduce a constant for "true"
                                      2. Introduce a constant for all occurrences of "true"
                                      3. Introduce a local constant for "true"
                                      4. Introduce a local constant for all occurrences of "true"

                                      That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

                                      Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

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

                                      Well, you know that true could true for very large values of false, so you might as well plan ahead.

                                      Software Zen: delete this;

                                      1 Reply Last reply
                                      0
                                      • OriginalGriffO OriginalGriff

                                        And how did they escape from kindergarten? This time, my code looks like this:

                                                XmlDocument xd = new XmlDocument();
                                                xd.Load(@"D:\\Test Data\\author.xml");
                                                xd.PreserveWhitespace = true;
                                        

                                        And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:

                                        1. Introduce a constant for "true"
                                        2. Introduce a constant for all occurrences of "true"
                                        3. Introduce a local constant for "true"
                                        4. Introduce a local constant for all occurrences of "true"

                                        That's embarrassing. Visual Studio no longer considers true or false to be constants in C# ... :-O

                                        Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                        D Offline
                                        D Offline
                                        Daniel Wilianto
                                        wrote on last edited by
                                        #19

                                        Googled and got this : true and false are lowercase reserved keywords. So yeah, 'true' is not a constant. The suggestions aren't wrong.

                                        1 Reply Last reply
                                        0
                                        • S Super Lloyd

                                          Wait! there is more!

                                          public static readonly bool Maybe = new Rand().Next(2) == 0;

                                          A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

                                          D Offline
                                          D Offline
                                          daleofcourse
                                          wrote on last edited by
                                          #20

                                          Actually literally laughed out loud like a maniachal despot in the office when I read this :laugh:

                                          S 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