V2/Cet/IO/Cet.IO/ByteArray/ByteArrayHelpers.Convert.NET.cs
/// <summary>
/// Create a new byte array starting from the defined
/// segment of the given one
/// </summary>
/// <param name="source">The source byte-array</param>
/// <param name="offset">The index of the first byte to be considered</param>
/// <param name="count">The number of the bytes to be considered</param>
/// <returns>The resulting byte-array</returns>
Create a new byte array starting from the defined
segment of the given one
Create a new byte array starting from the defined segment of the given one
public static byte[] ArrayCopy(
            byte[] source,
            int offset,
            int count)
        {
            var target = new byte[count];
            Buffer.BlockCopy(
                source,
                offset,
                target,
                0,
                count);
            return target;
        }
public static byte [ ] ArrayCopy ( byte [ ] source , int offset , int count ) { var target = new byte [ count ] ; Buffer . BlockCopy ( source , offset , target , 0 , count ) ; return target ; }
Create a new byte array starting from the defined
segment of the given one
Create a new byte array starting from the defined segment of the given one
The resulting byte-array
The resulting byte - array
source
byte[]
The source byte-array
The source byte - array
offset
int
The index of the first byte to be considered
The index of the first byte to be considered
count
int
The number of the bytes to be considered
The number of the bytes to be considered