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. Copy Byte []

Copy Byte []

Scheduled Pinned Locked Moved C#
data-structuresquestion
8 Posts 5 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.
  • H Offline
    H Offline
    half life
    wrote on last edited by
    #1

    Hi, i have an byte array i would like to copy from position 7 to 24 to an new byte array is there a simple way to do it or i'll have to copy each byte ?? :):):)

    Have Fun Never forget it

    O D G L 4 Replies Last reply
    0
    • H half life

      Hi, i have an byte array i would like to copy from position 7 to 24 to an new byte array is there a simple way to do it or i'll have to copy each byte ?? :):):)

      Have Fun Never forget it

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      Have a look at the documentation for the Array[^] class.

      H 1 Reply Last reply
      0
      • H half life

        Hi, i have an byte array i would like to copy from position 7 to 24 to an new byte array is there a simple way to do it or i'll have to copy each byte ?? :):):)

        Have Fun Never forget it

        D Offline
        D Offline
        DaveyM69
        wrote on last edited by
        #3

        Array.Copy(array1, 7, array2, 0, 18);

        Dave

        H 1 Reply Last reply
        0
        • D DaveyM69

          Array.Copy(array1, 7, array2, 0, 18);

          Dave

          H Offline
          H Offline
          half life
          wrote on last edited by
          #4

          THANKS a lot :):):):):)

          Have Fun Never forget it

          1 Reply Last reply
          0
          • H half life

            Hi, i have an byte array i would like to copy from position 7 to 24 to an new byte array is there a simple way to do it or i'll have to copy each byte ?? :):):)

            Have Fun Never forget it

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            This is the second question today about something that can easily be found in the documentation or on the web (search for "c# format binary string" and "c# copy part of array" to get the solutions as the first hit). You really should learn how to use google and MSDN Library, and save your forum posts until you need them. :)

            Despite everything, the person most likely to be fooling you next is yourself.

            H 1 Reply Last reply
            0
            • H half life

              Hi, i have an byte array i would like to copy from position 7 to 24 to an new byte array is there a simple way to do it or i'll have to copy each byte ?? :):):)

              Have Fun Never forget it

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

              System.Buffer.BlockCopy()

              xacc.ide - now with TabsToSpaces support
              IronScheme - 1.0 alpha 4a out now (29 May 2008)

              1 Reply Last reply
              0
              • O originSH

                Have a look at the documentation for the Array[^] class.

                H Offline
                H Offline
                half life
                wrote on last edited by
                #7

                THANKS :)

                Have Fun Never forget it

                1 Reply Last reply
                0
                • G Guffa

                  This is the second question today about something that can easily be found in the documentation or on the web (search for "c# format binary string" and "c# copy part of array" to get the solutions as the first hit). You really should learn how to use google and MSDN Library, and save your forum posts until you need them. :)

                  Despite everything, the person most likely to be fooling you next is yourself.

                  H Offline
                  H Offline
                  half life
                  wrote on last edited by
                  #8

                  I Will, Taken in notice :):):)

                  Have Fun Never forget it

                  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