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.
  • 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
                        • D daleofcourse

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

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

                          I think you might be ready for it! :thumbsup: :D

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

                          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