title: Sort Date time only by start date
body: <p>I have already asked a different question regarding <a href="https://stackoverflow.com/questions/15100233/sorting-date-and-time">Sorting Date Time</a> and got help from another user to pass my values. I am using a for loop like below, but definitely am wrong here because the code brings the value one by one rather than sorting.</p>
  
  <pre><code>public class Break
  {
      public DateTime MealStart { get; set; }
      public DateTime MealEnd { get; set; }
  }
  </code></pre>
  
  <p>my main class</p>
  
  <pre><code>IList&lt;DateTime&gt; starts = new List&lt;DateTime&gt;();
  IList&lt;DateTime&gt; ends = new List&lt;DateTime&gt;();
  DateTime breakStart1 = new DateTime(2012, 02, 15, 12, 30, 00);  // 15/02/12 12.30PM
  DateTime breakEnd1 = new DateTime(2012, 02, 15, 13, 30, 00);  // 15/02/12 01.30PM
  DateTime breakStart2 = new DateTime(2012, 02, 15, 11, 00, 00);  // 15/02/12 11.00AM
  DateTime breakEnd2 = new DateTime(2012, 02, 15, 12, 00, 00);  // 15/02/12 12.00PM
  DateTime breakStart3 = new DateTime(2012, 02, 15, 12, 00, 00);  // 15/02/12 12.00PM
  DateTime breakEnd3 = new DateTime(2012, 02, 15, 01, 00, 00);  // 15/02/12 01.00PM
  starts.Add(breakStart1);
  starts.Add(breakStart2);
  starts.Add(breakStart3);
  ends.Add(breakEnd1);
  ends.Add(breakEnd2);
  ends.Add(breakEnd3);
  for (int i = 0; i &lt; starts.Count; i++)
  {
      var breaks = new List&lt;Break&gt;()
      {
          //for (int j= 0; j&lt;starts.Count; j++)
          //{
          new Break()
          {
              MealStart = starts[i],
              MealEnd = ends[i]
  
          }
          // }
      };
  
      var ordered = breaks.OrderBy(s =&gt; s.MealStart);
      foreach (var ord in ordered)
      {
          System.Console.WriteLine(ord.MealStart);
          System.Console.WriteLine(ord.MealEnd);
      }
  }
  </code></pre>
  
  <p>I am expecting a result like below</p>
  
  <pre><code>breakStart1 = 15/02/12 11.00AM
  breakEnd1= 15/02/12 12.00PM
  breakStart2 = 15/02/12 12.00PM
  breakEnd2= 15/02/12 01.00PM
  breakStart3 = 15/02/12 12.30PM
  breakEnd3= 15/02/12 01.30PM
  </code></pre>
  
  <p>but it's not because of the for loop.</p>