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

CSharp examples for System:DateTime Convert

Description

Gets the Minimum value for a DateTime specifying kind.

Demo Code

// All Rights Reserved
using System.Diagnostics;

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

Related Tutorials