4
投票
4答案
2548 次观看

How to I find specific generic overload using reflection?

I am attempting to create an Expression that will invoke a specific generic overloaded method (Enumerable.Average in my first test case). The specific type bindings are not known until runtime however so I need to use Reflection to find and create the correct generic method (the Expression is bei...

6
投票
7答案
1744 次观看

What is the best way to merge two objects during runtime using C#?

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; } public string Property1 { get; set; } public string Property2 { get; set; } public string Property3 { get; set; } public str...