memcopy in C#
-
I have an array of bytes like : <00><01><01><03><00><00><01><01><03> I would like to compare if one byte is in the array ( ) an copy at the index of this byte selected to the end of the array ex : Select the and copy it to another array <00><01><01><03><00><00><01><01><03> => result : <00><00><01><01><03> Best Regards youssef
-
I have an array of bytes like : <00><01><01><03><00><00><01><01><03> I would like to compare if one byte is in the array ( ) an copy at the index of this byte selected to the end of the array ex : Select the and copy it to another array <00><01><01><03><00><00><01><01><03> => result : <00><00><01><01><03> Best Regards youssef
-
I have an array of bytes like : <00><01><01><03><00><00><01><01><03> I would like to compare if one byte is in the array ( ) an copy at the index of this byte selected to the end of the array ex : Select the and copy it to another array <00><01><01><03><00><00><01><01><03> => result : <00><00><01><01><03> Best Regards youssef
If you already have this in a
byte[]
array, too, you can useArray.Copy
(inheritted by yourbyte[]
thanks to hook-ups in the CLR) to pass the start index or even the index into the destination array at which you want to write the new array (the array elements must first exist). This is common throughout the .NET BCL for classes that deal with buffers like this. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]