fill Byte array Little Endian - CSharp System

CSharp examples for System:Byte Array

Description

fill Byte array Little Endian

Demo Code

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

public class Main{
        public static void  fillBytesLittleEndian(byte[] byteArray, long value_Renamed, int cnt, int index)
        {
            for (int i = 0; i < cnt; i++)
            {
                byteArray[index + i] = (byte) (value_Renamed & 0xff);
                value_Renamed >>= 8;
            }
        }
}

Related Tutorials