Volante.Impl.Bytes.unpack4 C# (CSharp) Method

unpack4() public static method

public static unpack4 ( byte arr, int offs ) : int
arr byte
offs int
return int
        public static unsafe int unpack4(byte[] arr, int offs)
        {
            fixed(byte* p = &arr[offs])
            {
                return *(int*)p;
            }
        }

Usage Example

Esempio n. 1
0
 public static decimal unpackDecimal(byte[] arr, int offs)
 {
     int[] bits = new int[4];
     bits[0] = Bytes.unpack4(arr, offs);
     bits[1] = Bytes.unpack4(arr, offs + 4);
     bits[2] = Bytes.unpack4(arr, offs + 8);
     bits[3] = Bytes.unpack4(arr, offs + 12);
     return(new decimal(bits));
 }
All Usage Examples Of Volante.Impl.Bytes::unpack4