Exemple #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?());
 }
Exemple #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?());
 }