CSharp examples for System:Byte Array
fill long to Byte array
/// Distributed under the Mozilla Public License * using System;/* www . j a va 2 s. c o m*/ public class Main{ public static void fillBytes(byte[] byteArray, long value_Renamed, int cnt, int index) { for (int i = 0; i < cnt; i++) { byteArray[cnt - i - 1 + index] = (byte) (value_Renamed & 0xff); value_Renamed >>= 8; } } }