Good morning, I have to search through a FOREACH if a capo contains any of the chains. Example
foreach (var item in Clientes.Listado)
{
if (item.Nombre.Contains("Juan") || item.Nombre.Contains("Carlos") || item.Nombre.Contains("Pedro"))
{
...Codigo
}
}
I would like to change item.Nombre.Contains("Juan") || item.Nombre.Contains("Carlos") || item.Nombre.Contains("Pedro")
For something more Prolijo like in FoxPro that would be
if INLIST(item.Nombre,"Juan","Carlos","Pedro")