1
I have a list on C#
and currently the search code is like this:
filter = lst.Where(s => s.Contains(num.Text) ).Take(3).ToList();
The list lst
is based on a list with phone numbers and contact names, example:
123456789$nome1
987654321$nome2
Currently I am looking for the number, I wanted to do an OR to be able to search also by the name example:
num.Text = 9;
nome.Text = "l";
I wanted to get the first 3 items on the list that has the value of nome.Text
OR OF num.Text
Any specific difficulty? It is equal to an if`` .
– Maniero
To
lst
has fields of type Numeric or Text?– Randrade
It has been a long time that I do not touch with C#, today I went to add this functionality and do not remember anything of the method
Where
, his condition would be ifs
containsnum.Tex
t ornome.Text
– Leonardo
This is a list of
string
– Leonardo