Q:

How to write linq query for select ID from list of list?

How to write linq query for select ID from list of list?
I have following List: SearchingDataList,in this list again contains another list that is
called SearchDataList and in this list contains an ID field.
How do i Select that particular ID while I select selectedItem from a ListBox?
The structure is like this:
SearchingDataList.SearchDataList.ID

A:

var result = OuterList.Where(t=>t.InnerList.Any(s=>s.Id == yourID));

