Quote Originally Posted by jmcilhinney View Post
You should use the Bitconverter class to convert various values to Bytes and see the result, then work out what exactly you need to do to go the other way.
The dictation format (By MS) is like
Code:
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        TextBox1.Text = BitConverter.ToString(BitConverter.GetBytes(CByte(NumericUpDown1.Value) * 256 + CByte(NumericUpDown2.Value)))
    End Sub
You mean this way? Which in my case it returns 4 discrete bytes (by dashes), to be honest I panic at first sight...


Quote Originally Posted by Zvoni View Post
"Union Structures" like in C or Pascal Something like here:[/url]
Thanks for the link. In C we were used to do just (signed int)((HighByte * 256) + LowByte) . Ranges shrink or expand as you command. I thought it was as easy as C.