Fun With Method Missing and C# 4
Posted by: youve been HAACKED,
on 27 Aug 2009 |
View original | Bookmarked: 0 time(s)
Warning: What Im about to show you is quite possibly an abuse of the C# language. Then again, maybe its not. ;) Youve been warned. Ruby has a neat feature that allows you to hook into method calls for which the method is not defined. In such cases, Ruby will call a method on your class named method_missing. I showed an example of this using IronRuby a while back when I wrote about monkey patching CLR objects. Typically, this sort of wild chicanery is safely contained within the world of those wild...