V2/Cet/IO/Cet.IO/ByteArray/ByteArrayHelpers.Convert.cs
/// <summary>
/// Read an <see cref="System.Int16"/> from 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>
Read an  from the given byte array
starting from the specified offset,
and composed as the Little-endian format
Read an from the given byte array starting from the specified offset and composed as the Little - endian format
public static Int16 ReadInt16LE(
            byte[] buffer,
            int offset)
        {
            return (Int16)(
                buffer[offset] |
                (buffer[offset + 1] << 8));
        }
public static Int16 ReadInt16LE ( byte [ ] buffer , int offset ) { return ( Int16 ) ( buffer [ offset ] | ( buffer [ offset + 1 ] << 8 ) ) ; }
Read an  from the given byte array
starting from the specified offset,
and composed as the Little-endian format
Read an from 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