Hi
In my previous article I talked about why SortedList is not a good option to use if you need a sorted collection with keys that are not unique. Today I will show you how to use a regular generic List<T> to store sorted items. You basically have 2 options.
IComparable Interface
this means that you will have to make your stored class Implement the IComparable Interface. Here is an example:
Hi all.
In the course of my work i was in the need of a State Machine. i decided to implement a Generic version of the State Machine so I can reuse it if i will need it again. i started with defining the needs of a basic state and i can up with the [...]
We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution
Learn More