Conversion Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

So the plan is to send and recieve numbers of type double through the serial
port. I just don't know how to convert a double to a byte array as that's how
I am sending and recieving data through the port. Also, when recieving, how
to convert a byte array back to a double. Any information would be
appreciated. Thanks.

JRB
 
hi
you can use the BitConverter class
byte[] BitConverter.GetBytes( double )
the reverse is also there in the class

regards
Ansil
Dimensions
Technopark Trivandrum
(e-mail address removed)
 
Back
Top