5

Does anybody know how to implement an interface's property explicitly using Reflection.Emit?

Apostolis Bekiaris
  • 2,145
  • 2
  • 18
  • 21

2 Answers2

6

See the MSDN documentation for TypeBuilder.DefineMethodOverride, which includes an example of using Reflection.Emit to generate an explicit interface implementation using that method.

kvb
  • 54,864
  • 2
  • 91
  • 133
3

This Reflector Addin should help you. It translates the IL code of a given method into the C# code that would be needed to generate the same IL code using System.Reflection.Emit.

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
Mark Byers
  • 811,555
  • 193
  • 1,581
  • 1,452