Test to see if a double is a finite number (is not NaN or Infinity).
publicclass MainClass{
/// <summary>
/// Test to see if a double is a finite number (is not NaN or Infinity).
/// </summary>
/// <param name='value'>The value to test.</param>
/// <returns>Whether or not the value is a finite number.</returns>
publicstatic bool IsFinite(double value)
{
return !double.IsNaN(value) && !double.IsInfinity(value);
}
}