Which one is faster or any other better way to do it.
I have an array of byte with name:
sendBuffer, and i will like to make some thing like that
the value started from index of the array in realDataSent is now copy
to the beginning of the sendBuffer.
I have tried:
Array.Copy(send Buffer,
realDataSent, sendBuffer, 0, sendBuffer.Leng th - realDataSent);
and this one:
byte[] tempBuffer =
(byte[])sendBuffer.Clo ne();
Array.Clear(sen dBuffer, 0,
sendBuffer.Leng th);
Array.Copy(temp Buffer,
realDataSent, sendBuffer, 0, tempBuffer.Leng th - realDataSent);
Which one is faster or any other better way to do it.
Thanks
I have an array of byte with name:
sendBuffer, and i will like to make some thing like that
the value started from index of the array in realDataSent is now copy
to the beginning of the sendBuffer.
I have tried:
Array.Copy(send Buffer,
realDataSent, sendBuffer, 0, sendBuffer.Leng th - realDataSent);
and this one:
byte[] tempBuffer =
(byte[])sendBuffer.Clo ne();
Array.Clear(sen dBuffer, 0,
sendBuffer.Leng th);
Array.Copy(temp Buffer,
realDataSent, sendBuffer, 0, tempBuffer.Leng th - realDataSent);
Which one is faster or any other better way to do it.
Thanks
Comment