chris wrote:
I have a few byte arrays that I would like to combine into one array
(order needs to be kept). What would be the most efficient way to do
this?
Not to be smart, but the most efficient way would be not to do it at
all. Either get the producer of the byte arrays to write into a
pre-allocated array (see e.g. the alternative overloads of
Encoding.GetBytes for comparison), or keep the arrays together until you
need to do something else with them such as writing out to file or
network (e.g. see "Socket::Send(IList<ArraySegment<byte>buffers) ").
-- Barry
--
http://barrkel.blogspot.com/