Sorting of data in specific format
<p>I have tried to edit my code to the following
But dont seem to be the correct way:</p>

<pre><code>public int Compare(object x, object y)
{
    string s1 = (string)x;
    string s2 = (string)y;

    return DateTime.Compare(DateTime.ParseExact(s1.Substring(1), "MMddyyyy", CultureInfo.InvariantCulture),
                            DateTime.ParseExact(s2.Substring(1), "MMddyyyy", CultureInfo.InvariantCulture));
}

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
    IsolatedStorageFile myStore = IsolatedStorageFile.GetUserStoreForApplication();

    if (scheduleListBox.Items.Count == 0)
    {
        try
        {
            //Get all the directories name that start with "a"
            fileNames = myStore.GetDirectoryNames("a*");
            //Sort according to the schedule month
            //Array.Sort(fileNames);
            Array.Sort(new Compare(fileNames));
</code></pre>

<p>I have a data in a format of <strong>a08102011</strong> in a array list.</p>

<p>Where <strong>08</strong> is the <strong>month</strong>,
<strong>10</strong> is the <strong>day</strong>,
<strong>2011</strong> is the <strong>year</strong>.</p>

<p>How can it be sorted in the way that?</p>

<p>a08102011</p>

<p>a09112011</p>
