V1/Cet.Develop.NETMF.IO/ByteArray/ByteArrayHelpers.cs
/// <summary>
/// Read an <see cref="System.Int32"/> from the given byte array
/// starting from the specified offset, 
/// and composed as the Big-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 Big-endian format
Read an from the given byte array starting from the specified offset and composed as the Big - endian format
public static Int32 ReadInt32BE(
            byte[] buffer,
            int offset)
        {
            return (Int32)(
                buffer[offset + 3] |
                (buffer[offset + 2] << 8) |
                (buffer[offset + 1] << 16) |
                (buffer[offset] << 24));
        }
public static Int32 ReadInt32BE ( byte [ ] buffer , int offset ) { return ( Int32 ) ( buffer [ offset + 3 ] | ( buffer [ offset + 2 ] << 8 ) | ( buffer [ offset + 1 ] << 16 ) | ( buffer [ offset ] << 24 ) ) ; }
Read an  from the given byte array
starting from the specified offset,
and composed as the Big-endian format
Read an from the given byte array starting from the specified offset and composed as the Big - 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