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. byte[] to int32 conversion

byte[] to int32 conversion

Scheduled Pinned Locked Moved C#
data-structuresquestion
5 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.
  • S Offline
    S Offline
    stonee74
    wrote on last edited by
    #1

    hi there, Just a quickie: Are there classes around to directly convert a 4byte big byte array to an Int32, or do I need to go the manual way? Thanks a lot, stonee

    D P 2 Replies Last reply
    0
    • S stonee74

      hi there, Just a quickie: Are there classes around to directly convert a 4byte big byte array to an Int32, or do I need to go the manual way? Thanks a lot, stonee

      D Offline
      D Offline
      dynamic
      wrote on last edited by
      #2

      byte bt=0; int i = Convert.ToInt32(bt); MessageBox.Show(i.ToString()); switch(twinsOnWay) { case ("twins on the way"): MessageBox.Show("for mr and mrs dynamic","twins on the way"); break;

      S 1 Reply Last reply
      0
      • S stonee74

        hi there, Just a quickie: Are there classes around to directly convert a 4byte big byte array to an Int32, or do I need to go the manual way? Thanks a lot, stonee

        P Offline
        P Offline
        Paresh Gheewala
        wrote on last edited by
        #3

        have you checked out Convert Class, it offers great varieties ;)

        S 1 Reply Last reply
        0
        • D dynamic

          byte bt=0; int i = Convert.ToInt32(bt); MessageBox.Show(i.ToString()); switch(twinsOnWay) { case ("twins on the way"): MessageBox.Show("for mr and mrs dynamic","twins on the way"); break;

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

          i am talking about a byte array consisting of 4 bytes! thanks, stonee

          1 Reply Last reply
          0
          • P Paresh Gheewala

            have you checked out Convert Class, it offers great varieties ;)

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

            found a solution with the System.BitConverter.ToInt32(mybyteArray,4); thanks anyway, stonee

            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