I thought that the casting between int and byte[] is so easy and I have tried to cast a value to byte[] and then recast the value in other function to get int. Such as, int x = 89; and byte [] y;, the casting y=(byte[])x, not worked. How can I do that ? What I have want, for example :
in func1 in func2
int x ; x value is casted in the y y is taken and x value is
byte[] y; extracted
------func1----------- --------func2---------
^ ^ ^ ^
x = 33 ==feed into==> byte [] ===> extraction ===> 33