I was wondering what would be the best approach towards finding the index of a sub-array from within another byte array in C#. For example if I have the following as my main array.
byte[] inputArray = {0xFF,0xDD,0xA,0xF,0x1,0x2,0x78,0x05,0x00,0x01};
byte[] tobeFound = {0x78,0x05};
Now I want to find the byte array "tobeFound" inside inputArray. And I should get the index 6. This is a short example. Both arrays can be very large.
So what should I go for? LINQ, Array.IndexOf ?? I need to have good performance as well.
Thanks for any pointers and sharing some experience!