G
Guest
I am reading values from a device through a TCP/IP socket that represent an
ANSI float value. However, the values come across as 2 elements in a ushort
array. I need to map the 2 values bit patterns into a floating point number
to get the actual float values being returned.
In C++ I'd finagle it using pointers since a pointer is analogous to an
array. I could just create a ushort pointer, give it the address of a float
variable and assign the values to the pointer using array notation. The float
variable would then have the proper bit pattern.
I don't know how to do that type of thing in C#. Anyone out there know how?
Thanks,
Mike
ANSI float value. However, the values come across as 2 elements in a ushort
array. I need to map the 2 values bit patterns into a floating point number
to get the actual float values being returned.
In C++ I'd finagle it using pointers since a pointer is analogous to an
array. I could just create a ushort pointer, give it the address of a float
variable and assign the values to the pointer using array notation. The float
variable would then have the proper bit pattern.
I don't know how to do that type of thing in C#. Anyone out there know how?
Thanks,
Mike