V2/Cet/IO/Cet.IO/ByteArray/ByteArrayHelpers.Convert.cs
/// <summary>
/// Write an <see cref="System.Int64"/> to the given byte array
/// starting from the specified offset, 
/// and composed as the Little-endian format
/// </summary>
/// <param name="buffer">The source byte array</param>
/// <param name="offset">The index of the first byte to be considered</param>
/// <returns>The resulting value</returns>
Write an  to the given byte array
starting from the specified offset,
and composed as the Little-endian format
Write an to the given byte array starting from the specified offset and composed as the Little - endian format
public static void WriteInt64LE(
            byte[] buffer,
            int offset,
            Int64 value)
        {
            buffer[offset] = (byte)value;
            buffer[offset + 1] = (byte)(value >> 8);
            buffer[offset + 2] = (byte)(value >> 16);
            buffer[offset + 3] = (byte)(value >> 24);
            buffer[offset + 4] = (byte)(value >> 32);
            buffer[offset + 5] = (byte)(value >> 40);
            buffer[offset + 6] = (byte)(value >> 48);
            buffer[offset + 7] = (byte)(value >> 56);
        }
public static void WriteInt64LE ( byte [ ] buffer , int offset , Int64 value ) { buffer [ offset ] = ( byte ) value ; buffer [ offset + 1 ] = ( byte ) ( value >> 8 ) ; buffer [ offset + 2 ] = ( byte ) ( value >> 16 ) ; buffer [ offset + 3 ] = ( byte ) ( value >> 24 ) ; buffer [ offset + 4 ] = ( byte ) ( value >> 32 ) ; buffer [ offset + 5 ] = ( byte ) ( value >> 40 ) ; buffer [ offset + 6 ] = ( byte ) ( value >> 48 ) ; buffer [ offset + 7 ] = ( byte ) ( value >> 56 ) ; }
Write an  to the given byte array
starting from the specified offset,
and composed as the Little-endian format
Write an to the given byte array starting from the specified offset and composed as the Little - endian format
The resulting value
The resulting value
buffer
byte[]
The source byte array
The source byte array
offset
int
The index of the first byte to be considered
The index of the first byte to be considered
value
Int64