score:1
Accepted answer
Provided the keys are unique you could combine the two dictionaries as follows:
//Code
private Dictionary <int, aor.PhysicalObject> merger;
merger = Enumerable
.Concat( from a in log
.InitialState
.Agents
.Agent
select a
, from o in log
.InitialState
.Objects
.Object
select o
).ToDictionary(d => Convert.ToInt32(d.id)
, d => d as aor.PhysicalObject);
Source: stackoverflow.com
Related Articles
- C# Linq merge two dictionaries
- LINQ Source Code Available
- .NET 4 Code Contracts: "requires unproven: source != null"
- Merge duplicate data without affecting others in LINQ code
- How to merge 2 dictionaries
- creating Linq to sqlite dbml from DbLinq source code
- Linq: Merge the dictionaries
- How to merge two lists while adding metadata indicating value source with LINQ statement?
- source code for LINQ 101 samples
- Merge the values of multiple dictionaries into one list
- List or Array of String Contain specific word in Html Source Code
- Merge multiple dictionaries and aggregate values where required
- c# Linq or code to extract groups from a single list of source data
- Merge 2 TSV files in C# code cleanup
- Convert string[] to int[] in one line of code using LINQ
- How to merge a list of lists with same type of items to a single list of items?
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
- Value cannot be null. Parameter name: source
- Linq code to select one item
- C# - code to order by a property using the property name as a string
- How do I find the text within a div in the source of a web page using C#
- Roslyn failed to compile code
- Entity-framework code is slow when using Include() many times
- The data source does not support server-side data paging
- How are people unit testing code that uses Linq to SQL
- Entity Framework, Code First and Full Text Search
- How to merge a collection of collections in Linq
- What does this C# code with an "arrow" mean and how is it called?
- Efficiently merge string arrays in .NET, keeping distinct values
- How to resolve Value cannot be null. Parameter name: source in linq?
- How to use LINQ to pass the cell value from DataGridView to ListBox
- How to add specific item in SelectList at last position?
- Getting data from a string defined table name filtered on a string defined field
- Linq query Left Join condition
- How do I test DataTable fields for NULL in a C# LINQ query?
- How to join linq in c#?
- Change the Name of an array into Object with JavaScript
- How to i get the Value of Store procedure Output value in Entity Frame Work?
- LINQ enumeration of local dirves using DriveInfo
- Iterate through database records in groups of five to fill AcroFields with iTextSharp
- linq to sql startwith performance indexed columns
- SQL query with Group By and Having Clause in LINQ structure
- Unable to cast the type 'DynamicClass1' to type <T>. LINQ to Entities only supports casting EDM primitive or enumeration types
- Is it possible to dynamically switch database table in query?
- Sort list based on another?
- Split list at marker elements with LINQ?
- LINQ create new list from elements of outer and inner list
- Removing white space from db result in LINQ query
- How to know if OrderBy was applied to query?
- C# multiple joins and not existing in another table