Add Days - CSharp System

CSharp examples for System:DateTime Day

Description

Add Days

Demo Code

// (c) Copyright Microsoft Corporation.
using System.Windows.Markup;
using System.Windows;
using System.Globalization;
using System.Diagnostics;
using System;/*from  www.j  a  va2 s  . c  o m*/

public class Main{
        public static DateTime? AddDays(DateTime time, int days)
        {
            try
            {
                return cal.AddDays(time, days);
            }
            catch (System.ArgumentException)
            {
                return null;
            }
        }
}

Related Tutorials