コード例 #1
0
        /// <summary>
        /// Get the time of day from a given datetime.
        /// </summary>
        /// <param name="dateTime">The datetime from which to get the time of day.</param>
        /// <returns>The time of day as a ScheduleTime.</returns>
        public static ScheduleTime FromDateTime(DateTime dateTime)
        {
            ScheduleTime result = new ScheduleTime();

            result.Ticks = dateTime.TimeOfDay.Ticks;
            return(result);
        }
コード例 #2
0
 /// <summary>
 /// Get the time of day from a given datetime.
 /// </summary>
 /// <param name="dateTime">The datetime from which to get the time of day.</param>
 /// <returns>The time of day as a ScheduleTime.</returns>
 public static ScheduleTime FromDateTime(DateTime dateTime)
 {
     ScheduleTime result = new ScheduleTime();
     result.Ticks = dateTime.TimeOfDay.Ticks;
     return result;
 }