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. Ugh... [modified]

Ugh... [modified]

Scheduled Pinned Locked Moved The Lounge
databasequestioncsharplinqhelp
11 Posts 5 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.
  • M Offline
    M Offline
    Matt Newman
    wrote on last edited by
    #1

    for (int i = 0; i < keywords.Length; i++)
    {
    // keywords[i] index out of range exception?
    }

    Thats right, index out of range exception... No idea why, I put a Linq query in there and bam... My head hurts... -- modified at 22:32 Sunday 13th May, 2007 Its not a question, its just the easiest way to express my mental state after trying to "correct" this "bug".

    Matt Newman

    L S P 4 Replies Last reply
    0
    • M Matt Newman

      for (int i = 0; i < keywords.Length; i++)
      {
      // keywords[i] index out of range exception?
      }

      Thats right, index out of range exception... No idea why, I put a Linq query in there and bam... My head hurts... -- modified at 22:32 Sunday 13th May, 2007 Its not a question, its just the easiest way to express my mental state after trying to "correct" this "bug".

      Matt Newman

      L Offline
      L Offline
      Leslie Sanford
      wrote on last edited by
      #2

      Yikes! I caught myself starting to answer this and remembered where we are. Did you mean to post this in the Lounge?

      1 Reply Last reply
      0
      • M Matt Newman

        for (int i = 0; i < keywords.Length; i++)
        {
        // keywords[i] index out of range exception?
        }

        Thats right, index out of range exception... No idea why, I put a Linq query in there and bam... My head hurts... -- modified at 22:32 Sunday 13th May, 2007 Its not a question, its just the easiest way to express my mental state after trying to "correct" this "bug".

        Matt Newman

        S Offline
        S Offline
        Sathesh Sakthivel
        wrote on last edited by
        #3

        We have coding horrors message board. pls put this post there. Don't post it in Longue.

        Regards, Satips.

        1 Reply Last reply
        0
        • M Matt Newman

          for (int i = 0; i < keywords.Length; i++)
          {
          // keywords[i] index out of range exception?
          }

          Thats right, index out of range exception... No idea why, I put a Linq query in there and bam... My head hurts... -- modified at 22:32 Sunday 13th May, 2007 Its not a question, its just the easiest way to express my mental state after trying to "correct" this "bug".

          Matt Newman

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

          "after"? You're done? I'm curious to know what the cause was.

          P M 2 Replies Last reply
          0
          • M Matt Newman

            for (int i = 0; i < keywords.Length; i++)
            {
            // keywords[i] index out of range exception?
            }

            Thats right, index out of range exception... No idea why, I put a Linq query in there and bam... My head hurts... -- modified at 22:32 Sunday 13th May, 2007 Its not a question, its just the easiest way to express my mental state after trying to "correct" this "bug".

            Matt Newman

            L Offline
            L Offline
            Leslie Sanford
            wrote on last edited by
            #5

            Matt Newman wrote:

            Its not a question, its just the easiest way to express my mental state after trying to "correct" this "bug".

            Ah, ok. I've had a few of those in my time. :doh:

            1 Reply Last reply
            0
            • P PIEBALDconsult

              "after"? You're done? I'm curious to know what the cause was.

              P Offline
              P Offline
              Paul Brower
              wrote on last edited by
              #6

              'keywords' is obviously not zero based.

              M 1 Reply Last reply
              0
              • P Paul Brower

                'keywords' is obviously not zero based.

                M Offline
                M Offline
                Matt Newman
                wrote on last edited by
                #7

                Paul Brower wrote:

                'keywords' is obviously not zero based.

                Oh it is, its just a string array. I manually set the upper limit to two (happened to be the case I was testing) and it still ignorned the upper limit.

                Matt Newman

                P 1 Reply Last reply
                0
                • M Matt Newman

                  Paul Brower wrote:

                  'keywords' is obviously not zero based.

                  Oh it is, its just a string array. I manually set the upper limit to two (happened to be the case I was testing) and it still ignorned the upper limit.

                  Matt Newman

                  P Offline
                  P Offline
                  Paul Brower
                  wrote on last edited by
                  #8

                  Have you tried something like the following? I'm curious if that works. Also (stupid question), but is keywords populated? for (int i = keywords.GetLowerBound(0); i <= keywords.GetUpperBound(0); i ++) { }

                  P M 2 Replies Last reply
                  0
                  • P Paul Brower

                    Have you tried something like the following? I'm curious if that works. Also (stupid question), but is keywords populated? for (int i = keywords.GetLowerBound(0); i <= keywords.GetUpperBound(0); i ++) { }

                    P Offline
                    P Offline
                    Paul Brower
                    wrote on last edited by
                    #9

                    I just remembered I should not even be responding to this post in the Lounge. :omg:

                    1 Reply Last reply
                    0
                    • P PIEBALDconsult

                      "after"? You're done? I'm curious to know what the cause was.

                      M Offline
                      M Offline
                      Matt Newman
                      wrote on last edited by
                      #10

                      PIEBALDconsult wrote:

                      I'm curious to know what the cause was.

                      Me too, I just changed the block of code to not care :)

                      Matt Newman

                      1 Reply Last reply
                      0
                      • P Paul Brower

                        Have you tried something like the following? I'm curious if that works. Also (stupid question), but is keywords populated? for (int i = keywords.GetLowerBound(0); i <= keywords.GetUpperBound(0); i ++) { }

                        M Offline
                        M Offline
                        Matt Newman
                        wrote on last edited by
                        #11

                        Yep, it worked if I pulled the linq code within it out. Just when it was in there it would fail.

                        Matt Newman

                        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