title: C# Merge 2 objects of the same with linq 2 object
body: <pre><code>public class SomePropertyClass{
      public string VarA{get;set;}
      public string VarB{get;set;}
  }
  
  SomePropertyClass v1 = new SomePropertyClass(){VarA = "item 1"};
  SomePropertyClass v2 = new SomePropertyClass(){VarB = "item 2"};
  </code></pre>
  
  <p>Is it possible to create a third variable that will have:</p>
  
  <p>v3: VarA = "item 1",VarB = "item 2"</p>
  
  <p>I mean, I want to merge objects with linq to object.</p>
  
  <p><strong>Edit</strong><br>
  for now i need from the same type. but it would be nice in the future to merge by property name.  </p>
  
  <p>I have an account model with a lot of properties that the user input in step 1.<br>
  I want to merge this half full model with step 2 half full model.  </p>
  
  <p><strong>Edit 2</strong></p>
  
  <pre><code>//step 1
          GlobalOnBoardingDataModel step1= (GlobalOnBoardingDataModel)HttpContext.Current.Session[SessionVariableNameStepOne];
  //step 2           
          GlobalOnBoardingDataModel step2 = (GlobalOnBoardingDataModel)HttpContext.Current.Session[SessionVariableNameStepTwo];
  
  
  
       class GlobalOnBoardingDataModel {
          public string Email;//step 1
          public string Name;//step 1
          public string Phone;//step2
          public string Address;//step2
          }
      }
  </code></pre>
  
  <p>thanks</p>