WinRTXamlToolkit.Controls.Calendar.SelectedDateMin C# (CSharp) Method

SelectedDateMin() private static method

Inherited code: Requires comment.
private static SelectedDateMin ( Calendar cal ) : DateTime?
cal Calendar Inherited code: Requires comment 1.
return DateTime?
        private static DateTime? SelectedDateMin(Calendar cal)
        {
            DateTime selectedDateMin;

            if (cal.SelectedDates.Count > 0)
            {
                selectedDateMin = cal.SelectedDates[0];
                Debug.Assert(DateTime.Compare(cal.SelectedDate.Value, selectedDateMin) == 0, "The SelectedDate should be the minimum selected date!");
            }
            else
            {
                return null;
            }

            foreach (DateTime selectedDate in cal.SelectedDates)
            {
                if (DateTime.Compare(selectedDate, selectedDateMin) < 0)
                {
                    selectedDateMin = selectedDate;
                }
            }
            return selectedDateMin;
        }
        #endregion DisplayDateStart