Ejemplo n.º 1
0
 /// <summary>
 /// Returns the time span of a date range.
 /// </summary>
 /// <param name="range">The range of values.</param>
 /// <returns>The length of the range.</returns>
 public static double?GetLength(this Range <double> range)
 {
     return(range.HasData ? range.Maximum - range.Minimum : new double?());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the time span of a date range.
 /// </summary>
 /// <param name="range">The range of values.</param>
 /// <returns>The length of the range.</returns>
 public static TimeSpan?GetLength(this Range <DateTime> range)
 {
     return(range.HasData ? range.Maximum - range.Minimum : new TimeSpan?());
 }