Why does this return zero results?
Posted
by
Jon
on Stack Overflow
See other posts from Stack Overflow
or by Jon
Published on 2011-02-09T20:33:17Z
Indexed on
2011/02/09
23:25 UTC
Read the original article
Hit count: 298
I have a List<List<string>>
and when I try to search with the List<string>
it returns no results.
Any ideas?
Thanks
List<List<string>> test = new List<List<string>>();
List<string> ff = new List<string>();
ff.Add("1");
ff.Add("ABC 1");
test.Add(ff);
ff = new List<string>();
ff.Add("2");
ff.Add("ABC 2");
test.Add(ff);
var result = test.Where(x=>x.Contains("ABC"));
//result.Count(); is 0
© Stack Overflow or respective owner