Find the first occurrence/starting index of the sub-array in C#.
Given two arrays as parameters (x and y) and find the starting index where the first occurrence of y in x. I am wondering what the simplest or the fatest implementation would be. Example: when x = {1,2,4,2,3,4,5,6} y = {2,3} result starting index should be 3 Updated: since my code is crap I removed it from the question...