/// <summary> /// Static method used to add TimePeriod object to Time object. /// </summary> /// <param name="time">Time object</param> /// <param name="other">TimePeriod object</param> /// <returns>Time object that is sum of Time object and TimePeriod object</returns> public static Time Plus(Time time, TimePeriod other) { return(new Time((byte)(time.hours + other.hours), (byte)(time.minutes + other.minutes), (byte)(time.seconds + other.seconds))); }
/// <summary> /// Method used to add TimePeriod object to Time object. /// </summary> /// <param name="other">TimePeriod object</param> /// <returns>Time object that is sum of Time object and TimePeriod object</returns> public Time Plus(TimePeriod other) { return(new Time((byte)(hours + other.hours), (byte)(minutes + other.minutes), (byte)(seconds + other.seconds))); }