Tuesday, June 02, 2009

Fluent interfaces

I have seen this used in a couple of places, the most prominent being LInQ. You run a method and then you chain another method to it and so on and so on. It's a nice improvement in readability and a good alternative to static methods.

The clearest example I can give you is on Wikipedia. Check it out. It's actually very easy to use and implement.