Wednesday, August 21, 2013

c# joining string in a shorter and efficient manner

c# joining string in a shorter and efficient manner

How can I join various strings into a string in shortest and efficient
method. Currently I am doing in the following way
string str1 = string.Format(BitConverter.ToString(pass_packet, local_index
+ 511, 1) +
BitConverter.ToString(pass_packet, local_index + 510, 1) +
BitConverter.ToString(pass_packet, local_index + 509, 1) +
BitConverter.ToString(pass_packet, local_index + 508, 1) +
... + BitConverter.ToString(pass_packet, local_index +
400, 1));

No comments:

Post a Comment