title: Sort C# ArrayList with DateTime
body: <p>I have a C# <code>ArrayList</code> with objects that includes following fields. I have around 10 objects in the <code>ArrayList</code>. My problem is I need to sort the <code>ArrayList</code> based on the <code>StartDate</code> available  in the system which is a DateTime variable.</p>
  
  <pre><code>public int id { get; set; }
  public string title {get; set;}
  public bool allDay { get; set; }
  public string start { get; set; }
  public string end { get; set; }
  public string color { get; set; }
  public DateTime startDate { get; set; }
  public DateTime endDate { get; set; }
  public string Location { get; set; }
  public string StartDatestr { get; set; }
  public string EndDatestr { get; set; }
  public string StartTime { get; set; }
  public string EndTime { get; set; }
  public bool Alert { get; set; }
  public bool Repeat { get; set; }
  public Int32 RepeatDays { get; set; }
  public Int32 CalendarID { get; set; }
  public int CustomerNo { get; set; }
  public string CustomerName { get; set; }
  public bool IsProspect { get; set; }
  public string Description { get; set; }
  </code></pre>
  
  <p>Can someone please enlighten me? I tried <code>.Sort()</code> but it just doesn’t do anything (its dump to try sort on <code>ArrayList</code> which has objects I know).</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Update:</strong></p>
  
  <pre><code>List&lt;Appointment&gt; appointments = new List&lt;Appointment&gt;();
  </code></pre>
  
  <p>I created the <code>List</code> as above. Now can I sort it?</p>