1
Answer

HostToNetworkOrder with a value of type Single

Dale

Dale

18y
2.5k
1
i need to take a value from a textbox, convert the string to Single, put it into HostToNetworkOrder, and insert it into a byte array.

here is the code without the HostToNetworkOrder conversion:

blTempArray = BitConverter.GetBytes(Convert.ToSingle(txtNomThick.Text));


Whenever i put in the IPaddress.HostToNetworkOrder() method it says it has some invalid arguments. It only accepts values of type Long, Short, and Int.  How can i get around this problem?

Answers (1)