I’ve seen use of a method called AsDynamic(). IIRC it was an extension method. The idea is that for any object you can call myObject.AsDynamic() and get a dynamic version of it.
Thing is, I just can’t find the AsDynamic() method, despite much Googling. I’m assuming it’s something actually have implemented themselves, and I’d like to do the same.
I’m using .NET 4 client profile, and am very confused. 🙂
Many thanks in advance.
Turns out I was right – it was something someone (Greg Young) had a specific implementation for. The details of the implementation were taken from David Ebbo’s blog:
Use C# 4.0 dynamic to drastically simplify your private reflection code