Hi,
Here is an example for int to byte[4] conversion:
buf[0] = (byte) value;
buf[1] = (byte) value >> 8;
buf[2] = (byte) value >> 16;
buf[3] = (byte) value >> 24;
--
Andrew Gnenny
pulsar2003@/no-spam/email.ru (Please remove /no-spam/ for reply)
X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
any builtin-library for converting an int from little endian to big endian?
as I want to send my data over the network....
i can only find "System.Text.ASCIIEncoding.BigEndianUnicode", which is not
what i wanted...
any builtin-library for converting an int from little endian to big endian?
as I want to send my data over the network....
i can only find "System.Text.ASCIIEncoding.BigEndianUnicode", which is not
what i wanted...
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.