23 points · by andrewhare · 16y ago · 7 comments
Edit: hm.. but I note that this doesn't work for the using(){} construct.
This requires the object to implement an interface that is convertable to IDisposable instead of just looking for a `Dispose` method.
AOP weavers like postsharp let you do some duck typing like stuff by injecting interfaces as post compile step.
Actually Linq + Reflection is some of the most entertaining code to write C#. Example: http://github.com/ecoffey/Bebop/blob/master/Bebop/BebopAppli...
we're saying there "Give me all the types out of a specific assembly that implement IResource".