copy byte array - CSharp System

CSharp examples for System:Byte Array

Description

copy byte array

Demo Code

/// Distributed under the Mozilla Public License                            *
using System;//from   w  w w.  j  a v  a2 s  .co m

public class Main{
        public static byte[] copy(byte[] from, int start, int len)
        {
            byte[] to = new byte[len];
            Array.Copy(from, start, to, 0, len);
            return to;
        }
        public static byte[] copy(byte[] from, int start)
        {
            return copy(from, start, from.Length);
        }
        public static byte[] copy(byte[] from)
        {
            return copy(from, 0);
        }
}

Related Tutorials