What is the proper way of getting a member of a type using a metadata token of that member (with reflection)?
I've tried:
MemberInfo mi = type.GetMembers(bindingFlags).FirstOrDefault(m => m.MetadataToken == metadataToken);
What is the proper way of getting a member of a type using a metadata token of that member (with reflection)?
I've tried:
MemberInfo mi = type.GetMembers(bindingFlags).FirstOrDefault(m => m.MetadataToken == metadataToken);
The Module class provides a set of Resolve methods that can find the member, e.g.
Edit: ResolveMember cannot resolve properties and events, so the originally suggested approach has to be used.