Locating the positions of an array within another array

25 Views Asked by At

I am looking for all positions of an array within another array. In the examples on the next page, values are strings but I need to work with arrays: Array.IndexOf Method

Here are my examples:

Array.IndexOf(new byte[12] { 1, 2, 3, 4, 13, 10, 1, 1, 1, 1, 10, 13}, new byte[2] {13, 10}, 0)

Returned -1. Desired 4

Array.IndexOf(new byte[12] { 1, 2, 3, 4, 13, 10, 1, 1, 1, 1, 10, 13}, new byte[2] {13, 10}, 5)

Returned -1. Desired 10

Thanks

0

There are 0 best solutions below