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. General Programming
  3. C#
  4. is a byte array an octal number ?

is a byte array an octal number ?

Scheduled Pinned Locked Moved C#
sysadmindata-structuresquestion
3 Posts 3 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
    mmatteson
    wrote on last edited by
    #1

    when i'm looking at a value and using console.writeline(byte[0]); to print the output of a network stream. i am getting a 69 printed to the screen. is this an octal number or the binary number 69? 01000101?

    M C 2 Replies Last reply
    0
    • M mmatteson

      when i'm looking at a value and using console.writeline(byte[0]); to print the output of a network stream. i am getting a 69 printed to the screen. is this an octal number or the binary number 69? 01000101?

      M Offline
      M Offline
      Mike_V
      wrote on last edited by
      #2

      It is 69 in decimal (01000101 binary). I don't know how/if C# can display octal. A byte array is just a bunch of bytes - numbers that can range between 0-255 decimal, 00000000 to 11111111 binary, or 000-377 octal. HTH, Mike

      1 Reply Last reply
      0
      • M mmatteson

        when i'm looking at a value and using console.writeline(byte[0]); to print the output of a network stream. i am getting a 69 printed to the screen. is this an octal number or the binary number 69? 01000101?

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        If it was octal, it wouldn't have a 9 in it. If it was binary, then it wouldn't have a 6 OR a 9 in it. I would have thought byte was a keyword and couldn't be an array name... If you're worried, use ToString and pass it a format so you know what it is.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        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