Here's the simplest possible code for creating a custom collection class in the Microsoft .NET Framework that includes support for For…Each loops, an indexer method and initializing collections with { ...
Extension methods provide a great way for extending a class functionality -- but it's interfaces that let you use those methods anywhere you want. Extension methods let you add functionality to an ...