AuthorMessage
Meka][Meka
Unstopable
Posts: 700

this is technically just c# but because i used it for asp i will post it within asp section
Code:

using System;
using System.Collections;
using System.IO;
namespace InfoSystem
{
/// <summary>
/// This class is created by Anton Zamov
/// For more information about Anton Zamov
/// and a lot of other useful examples
/// please visit http://zamov.online.fr
/// You may use and redistribute this code as
/// long as you keep this message intact.
/// </summary>
   public class FilesDateComparer: IComparer
   {
      public int Compare (object x, object y)
      {
         int iResult;
         FileInfo oFileX=(FileInfo)x;
         FileInfo oFileY=(FileInfo)y;
         if(oFileX.LastWriteTime==oFileY.LastWriteTime)
         {
            iResult=0;
         }
         else
            if(oFileX.LastWriteTime>oFileY.LastWriteTime)
            {
               iResult=1;
            }
            else
            {
               iResult=-1;
            }
         return iResult;
      }
   }
}