Hello, I need to compare two lists, (in both lists I have paint codes, and amount of paint used, I need to see which codes are the same to see if the first list has more, the same or less paint than in the second and add it in the third list) how can I go through the lists using a foreach
List<ClaseAS400> Clase400 = new List<ClaseAS400>();
List<ClaseSQL> claseSql = new List<ClaseSQL>();
ClaseDiferencia claseDiferencia = new ClaseDiferencia();
foreach(var Elemento in Clase400)
{
}
Using Linq you can do this:
Here the SequenceEqual method is used which is used to compare two lists.
To use Linq you must put in the usings :