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. Converting binary to decimal the hard way

Converting binary to decimal the hard way

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharpcomquestion
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.
  • P Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #1

    http://www.codeproject.com/Forums/1649/Csharp.aspx?fid=1649&tid=4044425[^] My favorite part is: string sayii = textBox1.Text.Substring(0, textBox1.Text.Length); :wtf:

    P P 3 Replies Last reply
    0
    • P PIEBALDconsult

      http://www.codeproject.com/Forums/1649/Csharp.aspx?fid=1649&tid=4044425[^] My favorite part is: string sayii = textBox1.Text.Substring(0, textBox1.Text.Length); :wtf:

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

      Yeah, I found it very hard to keep a straight face while answering OP. I don't do C#, but I figured any language has to have a descendant of the grey-beard strtol(). Google had the answer before I'd finished typing the question. Cheers, Peter

      Software rusts. Simon Stephenson, ca 1994.

      1 Reply Last reply
      0
      • P PIEBALDconsult

        http://www.codeproject.com/Forums/1649/Csharp.aspx?fid=1649&tid=4044425[^] My favorite part is: string sayii = textBox1.Text.Substring(0, textBox1.Text.Length); :wtf:

        P Offline
        P Offline
        phil o
        wrote on last edited by
        #3

        You're right. There's a .ToString() missing. I.e. :

        string sayii = textBox1.Text.Substring(0, textBox1.Text.Length).ToString();

        P 1 Reply Last reply
        0
        • P PIEBALDconsult

          http://www.codeproject.com/Forums/1649/Csharp.aspx?fid=1649&tid=4044425[^] My favorite part is: string sayii = textBox1.Text.Substring(0, textBox1.Text.Length); :wtf:

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

          round two[^] Haven't got the heart to take the original thread any further. Peter

          Software rusts. Simon Stephenson, ca 1994.

          F 1 Reply Last reply
          0
          • P Peter_in_2780

            round two[^] Haven't got the heart to take the original thread any further. Peter

            Software rusts. Simon Stephenson, ca 1994.

            F Offline
            F Offline
            Firo Atrum Ventus
            wrote on last edited by
            #5

            Dropped my jaw when I read that message.

            Excuse me for my improper grammar and typos. It's because English is my primary language, not my first language. My first languages are C# and Java. VB, ASP, JS, PHP and SQL are my second language. Indonesian came as my third language. My fourth language? I'm still creating it, I'll let you know when it's done! :-D

            1 Reply Last reply
            0
            • P phil o

              You're right. There's a .ToString() missing. I.e. :

              string sayii = textBox1.Text.Substring(0, textBox1.Text.Length).ToString();

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

              Probably a ToUpper as well, to protect against lower-case binary digits. :sigh:

              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