CSharp examples for System:DateTime
Is DateTime Not In The Past
using System.Text.RegularExpressions; using System;/*from ww w. ja v a 2s. co m*/ public class Main{ public static void IsNotInThePast(DateTime param, string name) { if (param < DateTime.UtcNow) throw new ArgumentOutOfRangeException(name, String.Format("{0} cannot be in the past", name)); } }