I created a list of 13 file names, which I extracted using GetFileName (). Other list I broke a txt file and loaded those names into another list. So I have this:
ListaNomeArquivo
ListaNomeTxt
I need to get the name of the ListItemList list and see if it exists inside the ListItemTxt. Both Contains and Equals, always returns different and I have the same names. Just to give an example. I have in both lists that name:
web\ace\asp\ace0003a.asp
It turns out that the lambda I did, says they are different:
var busca = listaCommiter.Where(l => !l.Contains(listaFarm.ToString()));
How do I just store what does not really exist?
The complete code for this routine:
private List<string> ComparaArquivo()
{
List<string> listaCommiter = new List<string>();
List<string> listaFarm = new List<string>();
List<string> listaDiferenca = new List<string>();
try
{
listaCommiter = _listaCommiter();
listaFarm = _listaFarm();
var busca = listaCommiter.Where(l => !l.Contains(listaFarm.ToString()));
return listaDiferenca;
}
catch(Exception ex)
{
string r = ex.Message;
return null;
}
}
The list in return listaDiferenca;
is returning nothing, because I'm still developing. It will return busca
.