Int Array To Byte Array - CSharp System

CSharp examples for System:Byte Array

Description

Int Array To Byte Array

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.IO;/*from www.  j  a va  2s.  co  m*/
using System.Diagnostics;
using System.Collections.Generic;
using System;

public class Main{
    public static byte[] IntArrayToByteArray (int[] arrInt)
    {
        byte[] arrByte = new byte[arrInt.Length];
        
        for (int i = 0; i < arrInt.Length; i ++)
        {
            arrByte[i] = (byte) arrInt[i];
        }
        
        return arrByte;
    }
}

Related Tutorials