LINQ provides a Distinct() method, but in order to find distinct elements in a list of some target class, we must first implement the IEqualityComparer<T> interface in our target class. That’s what Distinct() uses in order to compute whether one element is the same as another element. Implementing IEqualityComparer<T>, however, is not so straightforward as… Read More

This article extends upon Simon Hewitt’s article on CodeProject. It is strongly recommended that you read Simon’s article also in order to fully understand the concepts. BACKGROUND XML serialization is an indispensable technique that has built-in support for in the .NET Framework. Using XML serialization, objects can be serialized to XML streams that may be… Read More

We use .NET Array and ArrayList objects quite often, but sometimes do not realize the benefits versus consequences of using one or the other. This article explains the differences between these two data structures enabling us to make an informed decision the next time we are required to choose between the two. An Array is… Read More