C# merge two objects together at runtime
<p>I have a situation where I am loading a very unnormalized record set from Excel.  I pull in each row and create the objects from it one at a time.  each row could contain a company and / or a client.</p>

<p>My issue is that multiple rows could have the same objects, so I may have already created it.  I do a comparison to see if it is already in the list.  If so I need to merge the two objects to ensure I have not gained any new information from the second row.</p>

<p>so:</p>

<pre><code>company   - client   - address   - phone
----------------------------------------
mycompany -          - myaddress - 
mycompnay - myclient -           - myphone
</code></pre>

<p>so the first row would create a company object with an address of "myaddress".
The second row would create another company object (which by my rules is the same company as the name is the same), this also having a client reference and a phone number.</p>

<p>So I would know they are the same but need to ensure all the data is merged into one object.</p>

<p>At the moment I am creating a utility class that takes both objects, (one being the primary and the other to be merged, so one has priority if there is a clash), it goes through each variable and assigns the values if there are any.  This is a bit boiler plate heavy and I was hoping there might be some utility I could utilize to do the manual work for me.</p>

<p>The example has been simplified as there are a fair few other variables, some basic types and others that are more complex items.</p>
