I have two objects and I want to merge them:
public class Foo
{
public string Name { get; set; }
}
public class Bar
{
public Guid Id { get; set; }
p
Aside from the question "Why", the only way I can think to take two objects, one known and one unknown, and combine them into a new type would be to use Reflection.Emit to generate a new type at runtime.
There are examples on MSDN. You would have to determine weather you wanted to merge fields that had the same name or have the known type supersede the unknown type.
As far as I can tell, there is no way to do this in LINQ.
Since all you're interested in is Properties it should be pretty easy to use this article as an example. Leave out the il for creating methods and you're good to go.