I'm quite a fan of extension methods. For those of you that don't know, extension methods allow you to extend and add behaviour to classes or interfaces without having to modify the class itself. For example, if you are using strings to store telephone numbers (who isn't? :)) and you want to have some form of validation on them, your best bet is going to be to have a static helper class with a method in it that takes a string, performs the validation and then returns a boolean value. Then whenever you want to call it, it looks something like StaticHelperClass.IsValidPhoneNumber(phoneNumberToCheck);
That is until extension methods came along...
As far as the initial developer is concerned, not much has changed. You still need the static helper class, you still need the static method that takes the string, and you still return the boolean. The only difference is a single keywork: 'this'. Now whenever someone wants to use your method, they can just call phoneNumberToCheck.IsValidPhoneNumber;. So why are they useful? Initially, you can see that they lead to easier to read code, which in turn leads to code that is easier to maintain. They also play a key role as a building block of LINQ (more to come on that later).
This is one of the new features of C# 3, which I'm going to be blogging about over the next few weeks or so, and presented on at the free Black Marble Visual Studio launch event.
---
So, what does this have to do with interfaces? Basically, you can write your static method to take an interface rather than a concrete class, and all of a sudden you've got some code that follows that interface round wherever it goes! Makes code re-use a bit easier if you didn't have much control over the original implementation of the code base, as you can have code that's common to a particular interface in that rather than in an abstract class (eg if you are already inheriting from another class in some uses of the interface). This has a really good chance of being abused though, so be careful when you implement these!
---
Extensions methods are a new language feature of C# 3 but only require .net 2.0 to function