Converts one unsigned integer into a byte array using the current Endianness.
Parameters
- value (UInt32)
- Unsigned integer to convert
Return Value
A bytearray of 4 bytes, content is depending on the Encoding
Examples
Convert an Integer to bytes using Big Endian and Little Endian
CopyC#
Endianness endian = new Endianness(1); //Little Endian byte[] output = endian.ConvertLong(3714444871); // output is now { 0x47, 0xee, 0x65, 0xdd } endian = new Endianness(256); //Big Endian byte[] output = endian.ConvertLong(3714444871); // output is now { 0xdd, 0x65, 0xee, 0x47 }