Пример #1
0
        public string Validate()
        {
            var sb = new StringBuilder();

            if (SelectedDate.AddTicks(SelectedTime.Ticks) <= DateTime.Now.AddMinutes(5))
            {
                sb.AppendLine("Please choose a date at least 5 minutes from now.");
            }

            return(sb.Length == 0 ? null : sb.ToString());
        }