August 21, 2014 at 21:40 #2971
An object is sent over a network as an array of bytes, e.g:
It is impossible to know what these bytes mean unless the correct type is known. For example:
int integer = BitConverter.ToInt32(result, 0); //integer = 1684497523 string str = Encoding.ASCII.GetString(result); //str = sdgd4 float dbl = BitConverter.ToSingle(result, 0); //dbl = 1.7073744E+22
Which is the correct answer?