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. can somebody explain the logic of this? [modified]

can somebody explain the logic of this? [modified]

Scheduled Pinned Locked Moved The Weird and The Wonderful
question
7 Posts 7 Posters 2 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.
  • D Offline
    D Offline
    Dogan Akhan
    wrote on last edited by
    #1

    I found some meaningless code in my project. do you have any idea about its logic? protected void Page_Load(object sender, EventArgs e) { string sHafta = string.Empty; try { sHafta = ddlHafta.SelectedValue; } catch (Exception) { sHafta = "0"; } } note that sHafta is a local variable :) -- modified at 5:27 Tuesday 13th November, 2007

    B L S P K 5 Replies Last reply
    0
    • D Dogan Akhan

      I found some meaningless code in my project. do you have any idea about its logic? protected void Page_Load(object sender, EventArgs e) { string sHafta = string.Empty; try { sHafta = ddlHafta.SelectedValue; } catch (Exception) { sHafta = "0"; } } note that sHafta is a local variable :) -- modified at 5:27 Tuesday 13th November, 2007

      B Offline
      B Offline
      Baconbutty
      wrote on last edited by
      #2

      Looks like the code is "shaftad" Poor pun sorry.

      I still remember having to write your own code in FORTRAN rather than be a cut and paste merchant being pampered by colour coded Intellisense - ahh proper programming - those were the days :)

      N 1 Reply Last reply
      0
      • D Dogan Akhan

        I found some meaningless code in my project. do you have any idea about its logic? protected void Page_Load(object sender, EventArgs e) { string sHafta = string.Empty; try { sHafta = ddlHafta.SelectedValue; } catch (Exception) { sHafta = "0"; } } note that sHafta is a local variable :) -- modified at 5:27 Tuesday 13th November, 2007

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        Leftover debugging code, you know, no one ever has to understand a single line of debugging code, as long as you remember to remove it :)

        xacc.ide
        IronScheme a R5RS-compliant Scheme on the DLR
        The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."

        1 Reply Last reply
        0
        • D Dogan Akhan

          I found some meaningless code in my project. do you have any idea about its logic? protected void Page_Load(object sender, EventArgs e) { string sHafta = string.Empty; try { sHafta = ddlHafta.SelectedValue; } catch (Exception) { sHafta = "0"; } } note that sHafta is a local variable :) -- modified at 5:27 Tuesday 13th November, 2007

          S Offline
          S Offline
          Shpendh
          wrote on last edited by
          #4

          hi there, i think that maybe you don't need this code in this part, because you're doing nothing , the local variables end in the end of method and I think that this code is just for spending a little more your memory.... exists any posibility that this code has the logic that you wanted to set this variable to any of you controls (like label, textbox etc), but you did not set to anyone of your control. I think that you forgot to set this value to any of your control. respect

          spaps

          1 Reply Last reply
          0
          • D Dogan Akhan

            I found some meaningless code in my project. do you have any idea about its logic? protected void Page_Load(object sender, EventArgs e) { string sHafta = string.Empty; try { sHafta = ddlHafta.SelectedValue; } catch (Exception) { sHafta = "0"; } } note that sHafta is a local variable :) -- modified at 5:27 Tuesday 13th November, 2007

            P Offline
            P Offline
            Paddy Boyd
            wrote on last edited by
            #5

            They must have been using the Hafta.net testing framework: Hafta.net.

            1 Reply Last reply
            0
            • B Baconbutty

              Looks like the code is "shaftad" Poor pun sorry.

              I still remember having to write your own code in FORTRAN rather than be a cut and paste merchant being pampered by colour coded Intellisense - ahh proper programming - those were the days :)

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

              classic!

              WPF - Imagineers Wanted Follow your nose using DoubleAnimationUsingPath

              1 Reply Last reply
              0
              • D Dogan Akhan

                I found some meaningless code in my project. do you have any idea about its logic? protected void Page_Load(object sender, EventArgs e) { string sHafta = string.Empty; try { sHafta = ddlHafta.SelectedValue; } catch (Exception) { sHafta = "0"; } } note that sHafta is a local variable :) -- modified at 5:27 Tuesday 13th November, 2007

                K Offline
                K Offline
                KarstenK
                wrote on last edited by
                #7

                There is missing some logic, as assigning sHafta to a member. I hope so...:confused:

                Greetings from Germany

                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