P
Peter van der Veen
Hi
I have the following problem.
In a file a have 2 byte value, but the first 10 Bits are a value and
the last 3 also.
I thought i read them as an UINT16 value and than do some shifting,
but VB.NET only allows this for integers and shorts.
If i read in the valu as a short and do the shifting then i got the
wrong value.
How to solve?
The code
Dim time As Short
time = r.ReadInt16
time = time >> 3
This gives the wrong value.
Dim time As UINT16
time = r.ReadUInt16
time = time >> 3 <this gives an error
I have the following problem.
In a file a have 2 byte value, but the first 10 Bits are a value and
the last 3 also.
I thought i read them as an UINT16 value and than do some shifting,
but VB.NET only allows this for integers and shorts.
If i read in the valu as a short and do the shifting then i got the
wrong value.
How to solve?
The code
Dim time As Short
time = r.ReadInt16
time = time >> 3
This gives the wrong value.
Dim time As UINT16
time = r.ReadUInt16
time = time >> 3 <this gives an error