title: Sorting a SortedDictionary based on value, not key
body: <p>I have a SortedDictionary, the key is a int value and the matching value to each key is a class object. The class contains a int and a two datetime variable.</p>
  
  <p>I need to sort my SortedDictionary based on the InTime datetime in my class. So that when I do a foreach to loop through my SortedDictionary I will have them sorted based on datetime.</p>
  
  <p>Is this possible? How can I achieve it?</p>
  
  <pre><code>enter code here
   class Busdetail
      {
          public int BusNo { get; set; }
          public DateTime InTime { get; set; }
          public DateTime OutTime { get; set; }
      }
  </code></pre>