princesszea
Technical User
Hi,
I have 2 arrays which I’m comparing values which works fine.
So basically I get the results from 2 arrays and compare the values and then add the missing files to a thrid array. The problem I have is when I added the missing files to the array I will like to add some more information to the missing file array.
e.g
array 1 array2 missingFileNames
1 1 4
2 2 5
3 3
4
5
So basically array2 has more information that I need to add to the missingFileNames. So instead of 4 I have 4 , Tim and 5, john
At the moment array2 only returns 1 item .
Thanks in advance
I have 2 arrays which I’m comparing values which works fine.
So basically I get the results from 2 arrays and compare the values and then add the missing files to a thrid array. The problem I have is when I added the missing files to the array I will like to add some more information to the missing file array.
e.g
array 1 array2 missingFileNames
1 1 4
2 2 5
3 3
4
5
So basically array2 has more information that I need to add to the missingFileNames. So instead of 4 I have 4 , Tim and 5, john
At the moment array2 only returns 1 item .
Code:
ArrayList array2 = FileProcessor. Array2();
ArrayList array1 = FileProcessor. array1 ();
ArrayList missingFileNames = new ArrayList();
if (array1.Count > 0 && array2.Count > 0)
{
foreach (string fileName in array2)
{
if (!array1.Contains(fileName))
{
missingFileNames.Add(fileName);
}
}
}
}
Thanks in advance