Dynamically implementing an interface in .NET 4.0 (C#)

前端 未结 5 2111
情话喂你
情话喂你 2020-12-01 02:49

With the new dynamic capabilities in .NET 4.0, it seems like it should be possible to dynamically implement an interface, e.g. given:

public interface IFoo 
         


        
5条回答
  •  猫巷女王i
    2020-12-01 03:09

    I think I wrote a library that does what you want... It is called DynamicWrapper (on CodePlex) and it will automatically wrap a a class so it implements an interface. Is this what you want?

提交回复
热议问题