Directory Freebies VS CheatSheet Forum

RSS

Email

Translate

Home About Archive Privacy Contact Advertise Write for Dev102
Posted by Amit on Jul 11th, 2008 | Filed under C# | 4 Comments

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:


Continue Reading...
Posted by Amit on Jan 8th, 2008 | Filed under .Net, C#, Visual Studio | 1 Comment

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 [...]


Continue Reading...
Write Article for Dev102

Write for Dev102!

We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution

Learn More