Linq Select: Using a value from a list if available
- by musefan
I am going to use some basic stripped down examples to illustrate my problem.
I have a class:
class Item
{
int ID;
bool Selected;
}
Now lets say I have two lists of the Item class:
List<Item> ListA = GetListA();
List<Item> ListB = GetListB();
Now I want to create a third list that has all the items from ListB. The important…