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
Unfortunately, this is not something you can do easily. The best you can do is to create an anonymous type as part of a LINQ query, but that will have local scope only, and so will only be good for you in the method wherein you make it.
When .NET 4 comes out, there's a new Dynamic Runtime Library that might help you out.