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. Other Discussions
  3. The Weird and The Wonderful
  4. Intellisense Strikes Again

Intellisense Strikes Again

Scheduled Pinned Locked Moved The Weird and The Wonderful
visual-studio
20 Posts 12 Posters 1 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.
  • F Offline
    F Offline
    Foothill
    wrote on last edited by
    #1

    I ended up doing this to myself a few weeks ago.

    public class MyObject
    {
    private int _number;

    public MyObject(int number)
    {
    _number = number;
    }

    public int Number
    {
    get { return Number; }
    }
    }

    If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.

    if (Object.DividedByZero == true) { Universe.Implode(); }

    P B W L A 6 Replies Last reply
    0
    • F Foothill

      I ended up doing this to myself a few weeks ago.

      public class MyObject
      {
      private int _number;

      public MyObject(int number)
      {
      _number = number;
      }

      public int Number
      {
      get { return Number; }
      }
      }

      If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.

      if (Object.DividedByZero == true) { Universe.Implode(); }

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

      Foothill wrote:

      since VS steps over them by default.

      And then trying to remember where the setting is takes an additional twenty minutes.

      1 Reply Last reply
      0
      • F Foothill

        I ended up doing this to myself a few weeks ago.

        public class MyObject
        {
        private int _number;

        public MyObject(int number)
        {
        _number = number;
        }

        public int Number
        {
        get { return Number; }
        }
        }

        If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.

        if (Object.DividedByZero == true) { Universe.Implode(); }

        B Offline
        B Offline
        Brisingr Aerowing
        wrote on last edited by
        #3

        Intellisense is not all that intelligent. What I would like is having Intellisense NOT select the property/method/etc you are currently typing in as the default item! How hard could it be to do that?

        What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

        K 1 Reply Last reply
        0
        • F Foothill

          I ended up doing this to myself a few weeks ago.

          public class MyObject
          {
          private int _number;

          public MyObject(int number)
          {
          _number = number;
          }

          public int Number
          {
          get { return Number; }
          }
          }

          If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.

          if (Object.DividedByZero == true) { Universe.Implode(); }

          W Offline
          W Offline
          wout de zeeuw
          wrote on last edited by
          #4

          Ouch, 20 mins? Never looked at the stack trace when you got the exception?

          Wout

          B 1 Reply Last reply
          0
          • W wout de zeeuw

            Ouch, 20 mins? Never looked at the stack trace when you got the exception?

            Wout

            B Offline
            B Offline
            Brisingr Aerowing
            wrote on last edited by
            #5

            You don't get a stack trace with a StackOverflowException. The application just quits.

            What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

            W 1 Reply Last reply
            0
            • B Brisingr Aerowing

              You don't get a stack trace with a StackOverflowException. The application just quits.

              What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

              W Offline
              W Offline
              wout de zeeuw
              wrote on last edited by
              #6

              In VS you do.

              Wout

              C 1 Reply Last reply
              0
              • W wout de zeeuw

                In VS you do.

                Wout

                C Offline
                C Offline
                Camilo Reyes
                wrote on last edited by
                #7

                Nope, I had a similar issue a while ago. The VS debugger just gives up with a StackOverflow error which is terrible. 20mins is admirable, I spent half a day learning from this experience. :rolleyes:

                W 1 Reply Last reply
                0
                • C Camilo Reyes

                  Nope, I had a similar issue a while ago. The VS debugger just gives up with a StackOverflow error which is terrible. 20mins is admirable, I spent half a day learning from this experience. :rolleyes:

                  W Offline
                  W Offline
                  wout de zeeuw
                  wrote on last edited by
                  #8

                  Maybe I'm a super ninja, but I only takes me a few minutes finding them. Turn on break on exceptions, and if that's too late you can usually pause the program after the cpu goes to 100% for a few secs, and voila you got your stack trace. Has worked for years for me.

                  Wout

                  B 1 Reply Last reply
                  0
                  • B Brisingr Aerowing

                    Intellisense is not all that intelligent. What I would like is having Intellisense NOT select the property/method/etc you are currently typing in as the default item! How hard could it be to do that?

                    What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

                    K Offline
                    K Offline
                    kmoorevs
                    wrote on last edited by
                    #9

                    Brisingr Aerowing wrote:

                    Intellisense is not all that intelligent

                    Still, it's come a long way since VS 6.0 when you had to type (or paste) all your variable names. I've been there recently and kept scrolling the mouse wheel, waiting for something to happen! :omg:

                    "Go forth into the source" - Neal Morse

                    B 1 Reply Last reply
                    0
                    • K kmoorevs

                      Brisingr Aerowing wrote:

                      Intellisense is not all that intelligent

                      Still, it's come a long way since VS 6.0 when you had to type (or paste) all your variable names. I've been there recently and kept scrolling the mouse wheel, waiting for something to happen! :omg:

                      "Go forth into the source" - Neal Morse

                      B Offline
                      B Offline
                      Brisingr Aerowing
                      wrote on last edited by
                      #10

                      Oldest VS version I've used is 2008.

                      What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

                      1 Reply Last reply
                      0
                      • W wout de zeeuw

                        Maybe I'm a super ninja, but I only takes me a few minutes finding them. Turn on break on exceptions, and if that's too late you can usually pause the program after the cpu goes to 100% for a few secs, and voila you got your stack trace. Has worked for years for me.

                        Wout

                        B Offline
                        B Offline
                        Brisingr Aerowing
                        wrote on last edited by
                        #11

                        On my machine it happens in less than a second. So no time to break the debugger.

                        What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

                        W 1 Reply Last reply
                        0
                        • B Brisingr Aerowing

                          On my machine it happens in less than a second. So no time to break the debugger.

                          What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

                          W Offline
                          W Offline
                          wout de zeeuw
                          wrote on last edited by
                          #12

                          I'm having both ninja skills and a magic core i7 then, sweet.

                          Wout

                          1 Reply Last reply
                          0
                          • F Foothill

                            I ended up doing this to myself a few weeks ago.

                            public class MyObject
                            {
                            private int _number;

                            public MyObject(int number)
                            {
                            _number = number;
                            }

                            public int Number
                            {
                            get { return Number; }
                            }
                            }

                            If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.

                            if (Object.DividedByZero == true) { Universe.Implode(); }

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

                            Lesson learnt: Do not use Intellisense for anything other than saving a few keystrokes.

                            1 Reply Last reply
                            0
                            • F Foothill

                              I ended up doing this to myself a few weeks ago.

                              public class MyObject
                              {
                              private int _number;

                              public MyObject(int number)
                              {
                              _number = number;
                              }

                              public int Number
                              {
                              get { return Number; }
                              }
                              }

                              If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.

                              if (Object.DividedByZero == true) { Universe.Implode(); }

                              A Offline
                              A Offline
                              Abhinav S
                              wrote on last edited by
                              #14

                              Foothill wrote:

                              class MyObject

                              Calling a class MyObject is a bit weird. You could call it MyClass or perhaps something more meaningful like NumberImpl or something?

                              Mobile Apps - Sound Meter | Color Analyzer | SMBC | Football Doodles

                              1 Reply Last reply
                              0
                              • F Foothill

                                I ended up doing this to myself a few weeks ago.

                                public class MyObject
                                {
                                private int _number;

                                public MyObject(int number)
                                {
                                _number = number;
                                }

                                public int Number
                                {
                                get { return Number; }
                                }
                                }

                                If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.

                                if (Object.DividedByZero == true) { Universe.Implode(); }

                                S Offline
                                S Offline
                                Sinisa Hajnal
                                wrote on last edited by
                                #15

                                Change your language to VB.NET. Has same capabilities as C#, better debugger, better intellisense and is NOT case sensitive :) You can write the property without having the variable spelled out. And without getter or setter.

                                Public ReadOnly Property Number as Integer

                                is all you need.

                                S Kornfeld Eliyahu PeterK 2 Replies Last reply
                                0
                                • S Sinisa Hajnal

                                  Change your language to VB.NET. Has same capabilities as C#, better debugger, better intellisense and is NOT case sensitive :) You can write the property without having the variable spelled out. And without getter or setter.

                                  Public ReadOnly Property Number as Integer

                                  is all you need.

                                  S Offline
                                  S Offline
                                  Sascha Lefevre
                                  wrote on last edited by
                                  #16

                                  Sinisa Hajnal wrote:

                                  better debugger, better intellisense

                                  How is it better?

                                  If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

                                  S 1 Reply Last reply
                                  0
                                  • S Sinisa Hajnal

                                    Change your language to VB.NET. Has same capabilities as C#, better debugger, better intellisense and is NOT case sensitive :) You can write the property without having the variable spelled out. And without getter or setter.

                                    Public ReadOnly Property Number as Integer

                                    is all you need.

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

                                    You probably lost the 'joke' icon... I would like to know in what way the debugger and the intellisense is better? And VB is NOT case-insensitive - the IDE only fixes your cases after you wrote the name down the first time (and this happens also in C# now)... As for the properties...

                                    public int Number { get; private set; }

                                    Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

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

                                    S Richard DeemingR 2 Replies Last reply
                                    0
                                    • S Sascha Lefevre

                                      Sinisa Hajnal wrote:

                                      better debugger, better intellisense

                                      How is it better?

                                      If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

                                      S Offline
                                      S Offline
                                      Sinisa Hajnal
                                      wrote on last edited by
                                      #18

                                      My last use of C# was about a year ago so if something changed I apologize for the comment. :) I didn't lost the joke icon. I use both languages and prefer VB.NET because of those three reasons (case insensitive, intellisense, debugger) Yes, VB.NET is case INsensitive. If I try to declare variable v and variable V in the same scope it will say it is already defined. In C# this is legal as these are two different variable names. Intellisense is better because it fills end of block automatically and it shows only items from your context not all loaded options. And fill most of the property and other stuff (true, partly because VB needs more text to code).

                                      1 Reply Last reply
                                      0
                                      • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                                        You probably lost the 'joke' icon... I would like to know in what way the debugger and the intellisense is better? And VB is NOT case-insensitive - the IDE only fixes your cases after you wrote the name down the first time (and this happens also in C# now)... As for the properties...

                                        public int Number { get; private set; }

                                        Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

                                        S Offline
                                        S Offline
                                        Sinisa Hajnal
                                        wrote on last edited by
                                        #19

                                        See my comment above.

                                        1 Reply Last reply
                                        0
                                        • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                                          You probably lost the 'joke' icon... I would like to know in what way the debugger and the intellisense is better? And VB is NOT case-insensitive - the IDE only fixes your cases after you wrote the name down the first time (and this happens also in C# now)... As for the properties...

                                          public int Number { get; private set; }

                                          Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

                                          Richard DeemingR Offline
                                          Richard DeemingR Offline
                                          Richard Deeming
                                          wrote on last edited by
                                          #20

                                          Or, with C# 6:

                                          public int Number { get; } = 42;

                                          // Or:

                                          public int Number { get; }

                                          public YourClass()
                                          {
                                          Number = 42;
                                          }

                                          :)


                                          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                          "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                                          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