You must use
If you use
Select, then you get a
SelectMany, you get only a
List<Node> exitNodes = gateways.SelectMany(gw => gw.Connections).Select(node => node).ToList();
The answer in this post explains the difference between
- LINQ merging multiple lists
- Merge multiple Lists into one List with LINQ
- Remove duplicates while merging lists using Union in LINQ
- Does this LINQ code perform multiple lookups on the original data?
- Linq get values not shared across multiple lists
- Interleaving multiple (more than 2) irregular lists using LINQ
- Merging 2 lists and sum several properties using LINQ
- Merging 2 Lists in LINQ
- Linq - merging sub lists from different objects into a single object
- How to reuse a linq expression for 'Where' when using multiple source tables
- LINQ to SQL, How to merge multiple IQueryable Lists of different subtype?
- LINQ Source Code Available
- multiple orderby in this linq code
- Efficient method of merging multiple lists based on item weights
- Merging few lists into one using linq
- Merging multiple lists
- creating Linq to sqlite dbml from DbLinq source code
- LINQ Query to Filter Items By Criteria From Multiple Lists
- LINQ How to return common objects across multiple lists
- How to combine multiple lists using LINQ lambda
- Find common items in multiple lists in C# linq
- LINQ - joining multiple lists
- LINQ - Combine multiple lists to form a new list and align them by key?
- Merging 2 lists with linq based on unique Id to avoid duplicates
- Error in merging 2 LINQ lists
- How to assign multiple LINQ Include() statements to a variable for code re-use?
- Joining & Transposing multiple Lists using LINQ
- How to merge two lists while adding metadata indicating value source with LINQ statement?
- Optimizing LINQ combining multiple lists into new generic list
- Linq query that tests for existence in multiple lists
- Linq insert selected data into ObservableCollection
- Group by day, time and id in one LINQ
- Get position in table with LINQ
- yield return foreach in linq
- dataclassesdatacontext' does not contain a constructor that takes 0 arguments?
- c# linq generated query length over the limit. Is there any way we could up lift this limit?
- Plinq gives different results from Linq - what am I doing wrong?
- Dynamic LINQ Query not working properly with Taxonomy field
- How can I use a List<> as the condition for my where clause with Linq?
- Find item in IList with LINQ
- How to query CSV like SQL using LINQ?
- Error when trying to cast anonymous object, Razor
- How to get average of list within lists using linq?
- Joining multiple ICollections in C# to retrieve data from other classes
- group child records by parentid and sum the amount linq C#
- Search functionality across many columns
- How to find List element with max member variable A, then output its member variable B?
- Getting Function Evaluation Timedout error when using function inside linq query
- "An explicit conversion exists" - LINQ
- Using "Any" or "Contains" when context not saved yet