Gets the Maximum value for a DateTime specifying kind. - CSharp System

CSharp examples for System:DateTime Convert

Description

Gets the Maximum value for a DateTime specifying kind.

Demo Code

// All Rights Reserved
using System.Diagnostics;

public class Main{
        /// <summary>
        /// Gets the Maximum value for a DateTime specifying kind.
        /// </summary>
        /// <param name="kind">DateTimeKind to use.</param>
        /// <returns>DateTime of specified kind.</returns>
        public static DateTime GetMaxValue(DateTimeKind kind)
        {/*from  w w  w.ja  v  a  2  s. com*/
            return new DateTime(DateTime.MaxValue.Ticks, kind);
        }
}

Related Tutorials