Good way to sort object by date property in anonymous type?
<p>I have the following code:</p>

<pre><code>var resultArticles = from a in articleItems 

select new
{
   Title = a.Title, 
   ArticleDate = a[Constants.FieldNames.ArticleStartDate] != null ?
     ((DateTime)a[Constants.FieldNames.ArticleStartDate]).ToString(Constants.Date.Format): string.Empty,
   ByLine = a[Constants.FieldNames.Byline],
   FileRef = SPUtility.ConcatUrls(web.Url, a.Url)
};

var sortedArticles = resultArticles.OrderBy(a =&gt; a.ArticleDate).ToList();

rptArticles.DataSource = sortedArticles;
rptArticles.DataBind();
</code></pre>

<p>I guess there must be a better way to sort/order here because if I have the dates (dd/mm/yyy)</p>

<pre><code>12.01.2011
11.02.2011
10.02.2011
13.01.2011
08.02.2011
</code></pre>

<p>it only sorts by the day and don't take the month into consideration so the result in sortedArticles is as follows:</p>

<pre><code>08.01.2011
10.02.2011
11.02.2011
12.01.2011
13.01.2011
</code></pre>

<p>I obviously want to display the latest article first, i.e. <code>11.02.2011</code></p>

<p>Any suggestions?</p>

<p>Thanks in advance.</p>
