I have a class that contains the following properties:
public class SomeClass() { public Int32 ObjectId1 {get;set;} public Int32 ObjectId2 {get;set;} public Int32 ActiveThickeness {get;set;} public Int32 ActiveFilterThickness {get;set;} }
I also have 2 lists:
List<SomeClass> A List<SomeClass> B
List A has data:
| ObjectId1 | ObjectId2 | ActiveThickness | ActiveFilterThickness | ------------------------------------------------------------------- | 1 | 3 | 50 | 0 | ------------------------------------------------------------------ | 1 | 2 | 400 | 0 | ------------------------------------------------------------------- | 4 | 603 | 27 | 0 | -------------------------------------------------------------------
List B has data:
| ObjectId1 | ObjectId2 | ActiveThickness | ActiveFilterThickness | ------------------------------------------------------------------- | 1 | 3 | 0 | 13671 | ------------------------------------------------------------------ | 1 | 2 | 0 | 572 | ------------------------------------------------------------------- | 29 | 11 | 0 | 4283 | -------------------------------------------------------------------
I want to combine A and B (using LINQ, if possible) in C List SomeCalss, which contains the following data:
| ObjectId1 | ObjectId2 | ActiveThickness | ActiveFilterThickness | ------------------------------------------------------------------- | 1 | 3 | 50 | 13671 | ------------------------------------------------------------------ | 1 | 2 | 400 | 572 | ------------------------------------------------------------------- | 29 | 11 | 0 | 4283 | ------------------------------------------------------------------- | 4 | 603 | 27 | 0 | -------------------------------------------------------------------
How can I achieve this?
Shpongle
source share