for instance:
try
{
FloatConversion(txtNomThick.Text).CopyTo(blUpdatedArray,22);
}
catch(Exception ex)
{
cls_pv_ErrorJournal.RecordError("[v_p_Sender] : " + ex.Message, true);
}
.
.
.
private byte[] FloatConversion(String spTextBox)
{
byte[] blTempArray = new byte[4];
try
{
Single slTextBox = Convert.ToSingle(spTextBox);
Int32 ilTextBox = (Int32) slTextBox;
ilTextBox = System.Net.IPAddress.HostToNetworkOrder(ilTextBox);
blTempArray = BitConverter.GetBytes(ilTextBox);
}
catch(Exception ex)
{
cls_pv_ErrorJournal.RecordError("Form1.cs> (FloatConversion) : " + ex.Message, true);
}
return blTempArray;
}
Replies
Know the answer? Post it — somebody with the same question will find it here.