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. Testing the null

Testing the null

Scheduled Pinned Locked Moved The Weird and The Wonderful
testingbeta-testing
6 Posts 4 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.
  • B Offline
    B Offline
    bourdiitsme
    wrote on last edited by
    #1

    Find in code :

    // Check the result of area to avoid a Nan in display
    if (Area.GetValueOrDefault(-1) == -1)
    {
    return 0;
    }

    return Area;

    It's lucky that Area is non negative.

    OriginalGriffO S 2 Replies Last reply
    0
    • B bourdiitsme

      Find in code :

      // Check the result of area to avoid a Nan in display
      if (Area.GetValueOrDefault(-1) == -1)
      {
      return 0;
      }

      return Area;

      It's lucky that Area is non negative.

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

      bourdiitsme wrote:

      // Check the result of area to avoid a Nan in display

      Why are you trying to avoid exhibiting my maternal Grandmother?

      Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

      "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

      A 1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        bourdiitsme wrote:

        // Check the result of area to avoid a Nan in display

        Why are you trying to avoid exhibiting my maternal Grandmother?

        Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

        A Offline
        A Offline
        AspDotNetDev
        wrote on last edited by
        #3

        :laugh: Nobody wants to see your grandmother on display. :~

        [Forum Guidelines]

        OriginalGriffO 1 Reply Last reply
        0
        • A AspDotNetDev

          :laugh: Nobody wants to see your grandmother on display. :~

          [Forum Guidelines]

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

          You have no idea how glad that makes me! I don't think she'd be too happy herself - she has been dead for years... :laugh:

          Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

          "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

          1 Reply Last reply
          0
          • B bourdiitsme

            Find in code :

            // Check the result of area to avoid a Nan in display
            if (Area.GetValueOrDefault(-1) == -1)
            {
            return 0;
            }

            return Area;

            It's lucky that Area is non negative.

            S Offline
            S Offline
            supercat9
            wrote on last edited by
            #5

            I wonder if the code at some point had some different instructions, possibly logging, for the null and non-null cases?

            B 1 Reply Last reply
            0
            • S supercat9

              I wonder if the code at some point had some different instructions, possibly logging, for the null and non-null cases?

              B Offline
              B Offline
              bourdiitsme
              wrote on last edited by
              #6

              It's just a little fix to get a value and not a Nan (french-glish comments! :laugh: ). Why do simple ?

              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