L
linuxfedora
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(sendBuffer,
realDataSent, sendBuffer, 0, sendBuffer.Length - realDataSent);
and this one:
byte[] tempBuffer =
(byte[])sendBuffer.Clone();
Array.Clear(sendBuffer, 0,
sendBuffer.Length);
Array.Copy(tempBuffer,
realDataSent, sendBuffer, 0, tempBuffer.Length - 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(sendBuffer,
realDataSent, sendBuffer, 0, sendBuffer.Length - realDataSent);
and this one:
byte[] tempBuffer =
(byte[])sendBuffer.Clone();
Array.Clear(sendBuffer, 0,
sendBuffer.Length);
Array.Copy(tempBuffer,
realDataSent, sendBuffer, 0, tempBuffer.Length - realDataSent);
Which one is faster or any other better way to do it.
Thanks