I have two string array
string[] a;
string[] b;
How can I find that the sequence of element in array a is similar to array b?
As I am using .net2.0 I can’t use LINQ.
EDIT
This is what I have tried
foreach (string val2 in a)
{
foreach (string val1 in b)
{
if (val1 == val2)
{
// Values are same - continue processing
}
else
{
// Value not same -- exit }
}
}
I believe you want to see if the elements in both arrays have same value and on same index. You can have a simple method like: