Recently I ran into a need to keep a list of integers sorted in ascending order. The list was used as an internal representation of a set, so I didn't have to create a new class implementing IList or anything similar. The whole issue was to implement adding new elements properly. Of course, I started with writing a routine to find a proper place for a new element, move all subsequent elements and so on. This is quite a bit of code and it is easy to make a mistake here....