Invalid Date - CSharp System

CSharp examples for System:DateTime

Description

Invalid Date

Demo Code


using System.Diagnostics;
using System.Collections.Generic;
using System;// w w  w. ja  va 2s .  c o  m

public class Main{

            [DebuggerStepThrough]
            public static void InvalidDate(DateTime argument, string argumentName)
            {
                if (!argument.IsValid())
                {
                    throw new ArgumentOutOfRangeException(argumentName);
                }
            }
}

Related Tutorials