Badri,
You can use the static Copy method on the Array class to do this.
However, it will not work in all cases. It will work for your second case
only. The reason it won't work for the others is as follows:
1 - You have the potential to lose information on the conversion of each
integer element to a byte element.
3 - The Copy method doesn't know how to convert between an int and a string.
You have to loop through each element and do the conversion yourself.
4 - The same as #3, but vice versa.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Badri Mohan" <bm****@NOSPAMuncc.edu> wrote in message
news:OG**************@TK2MSFTNGP11.phx.gbl...
Hi Guys
I am tired of finding solution to this..
Help me when u find time
How to convert from
int[] to byte[] //right now i do by a for loop
byte[] to int[] //right now i do by a for loop
int[] to string //I donno how to do this
string to int[] //I donno how to do this
Regards
Badri