Dale

Dale

  • NA
  • 15
  • 0

HostToNetworkOrder with a value of type Single

Aug 2 2006 11:26 AM
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)