Remove First X Bytes - CSharp System

CSharp examples for System:Byte Array

Description

Remove First X Bytes

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;/*from   ww w .  j  av a 2s .  c  o m*/

public class Main{
        public static byte[] RemoveFirstXBytes(byte[] inputArray, int amountOfBytes)
        {
            byte[] result = new byte[inputArray.Length - amountOfBytes];
            Array.Copy(inputArray, amountOfBytes, result, 0, inputArray.Length - amountOfBytes);
            return result;
        }
}

Related Tutorials