automatically sorting data structure for objects based on key?
<p>I would like a structure to automatically sort data for me based on an associated key, but once this is done I never have to grab any of the objects with the key, I just want to take the first one off the list. In my specific case each object has an associated float value, and I want to order them from low to high.</p>

<p>For example I want to be able to sort a list of integers, but by their corresponding float 'keys' and grab the one at index 0 - (which will be the one with the lowest associated float)</p>

<p>I came across orderedDictionary's but I don't fully understand them and don't know how appropriate they are for my needs. I thought they were just a dictionary that allowed you to also index into them, but they aren't a template class? </p>
