/// <summary> /// /// </summary> /// <param name="bytes">byte array to convert</param> /// <param name="offset">offset index of the conversion</param> /// <param name="byteOrder">Endianness of conversion</param> /// <returns></returns> public static uint ToUint(this byte[] bytes, int offset, ByteOrder byteOrder = ByteOrder.LittleEndian) { return(byteOrder == ByteOrder.LittleEndian ? ByteConverter.LE_To_UInt32(bytes, offset) : ByteConverter.BE_To_UInt32(bytes, offset)); }