I have a first list of string :
"GENRE",
"NATIONALITY",
"PRODUCTION",
"FIRSTYEAR",
"LASTYEAR",
"FILTER"
I have a second list of string:
"NATIONALITY"
"LASTYEAR"
"FILTER"
I would like to check if element in the second list (even if some element are missing) are in the same order as the first list.
Example :
"NATIONALITY"
"LASTYEAR"
"FILTER"
must return TRUE and
"LASTYEAR"
"NATIONALITY"
"FILTER"
must return FALSE because "NATIONALITY" has to be before "LASTYEAR" accordingly to the first list
I have tried to get index with "IndexOf" of each element but I don't know how to compare them effectively.
Is a good to solution to use a Custom Comparer (implementing IComparer) in this case ? If yes how ? Is it better to use Enum to achieve this comparison ?
Need help thanks in advance