Infer types in reflected methods in C#