Development – Leet 4 Life

Software Development Code Samples and More

Skip to: Content | Sidebar | Footer

Tag: IList

Creating an Expandable Custom Collection in C# .NET

26 February, 2012 | C#. NET | By: Michael Merrell

There comes a time where you occasionally will need to extend the functionality of an existing object or type. Say for instance you want to add the ability for a List object to return a concatenated string of it’s contained values. Or you want to have the ToString method return an XML String representation of your current collection. To do this in more you you simply need to create a new class that inherits from IList and then you have the flexibility to do whatever you want to do including the ability to have logic around preventing the removal of [Read More…]