I am not sure by what you mean as "the most frequent" but either way you can use LINQ.
(Side note.. You could use
List[DateTime]
instead of ArrayList... no casting then. I will use this for simplicity)
Assume you mean the most recent...
List<datetime> list = new List<datetime>
...
var now = DateTime.Now;
var mostRecent = list.Min(date => now - date);
</datetime></datetime>
If you mean the "most common" then you can use LINQ to find the highest count.
DateTime highCountValue = null;
int count = int.MinValue;
list.ForEach(dateTime =>
{
var potentialCount = list.Count(d => d == dateTime);
if(potentialCount > count)
{
count = potentialCount;
highCountValue = dateTime;
}
});