Say I have the following string lists:
string[] list1 = { "one", "two", "three", "four"};
string[] list2 = { "one", "two", "three" };
string[] list3 = { "three", "two", "one" };
I need a query that allows me to compare list2 to list1 and return true if all the strings in list2 exist in list1, in the same order as list2.
So, such a query would return true if I compare list2 to list1 because all the strings in list2 are in list1, in the same order as list2.
The query would return false if I compare list3 to list1 because even though the strings in list3 exist in list1, they are not in the same order.
Is such a query possible?