I have an ipv4-address stored in a byte array. At index n and until index n+3 each index takes 4 bytes.
(index) n n+1 n+2 n+3
[..] [..] [..] [ 1st byte ][ 2nd ] [ 3rd ] [ 4th ] [..] [..]
how to copy this construction to string. I want to receive string like "192.168.0.1", while
byteArray[n] = 192;
byteArray[n+1] = 168;
byteArray[n+2] = 0;
byteArray[n+3] = 1;
Finally, the problem was solved and the solution is:
string str = recCommand.parameters[10] + "." + recCommand.parameters[11] +
"." + recCommand.parameters[12] + "." + recCommand.parameters[13];
nthroughn + 3to a string and combine them. Until you actually show what you have tried I have to down vote this question.string str = recCommand.parameters[10] + "." + recCommand.parameters[11] + "." + recCommand.parameters[12] + "." + recCommand.parameters[13];