I'm using Type.InvokeMember() to dynamically invoke various members of a Type. Since the members can be generic and also include out parameters etc., I'm happy to have the runtime handle this. However, I also need to have additional information about the actual member that's been invoked -- particularly, the return type. If this type is nullable, I need to do some additional processing.
So, I'd like to know if it's possible to get the MemberInfo object corresponding to the member that was invoked through Type.InvokeMember().
Alternatively, is there a variant of InvokeMember() that simply does the lookup and returns the appropriate MemberInfo object but doesn't actually invoke it? I can then analyze the MemberInfo object, and later invoke it directly.
I haven't been able to find any .NET APIs that do this, so I suspect I'll need to handcode it. Let me know if I'm missing something.