char [ ] to float?
-
hi all!i have a code like this.The port.Read(4) mean that i read 4 bytes from serial port..i had convert from byte [] to char [] and now i want to convert from char [] to float? mean that my final answer must be in float type.How can i do it?Thanks! private char [] Read_Data = new char[4]; { Read_Data = Encoding.ASCII.GetChars(port.Read(4)); }
-
hi all!i have a code like this.The port.Read(4) mean that i read 4 bytes from serial port..i had convert from byte [] to char [] and now i want to convert from char [] to float? mean that my final answer must be in float type.How can i do it?Thanks! private char [] Read_Data = new char[4]; { Read_Data = Encoding.ASCII.GetChars(port.Read(4)); }
play around System.Convert.Tofloat() or ToDouble sorry if I is not correct. << >>