public class MainClass{
///
/// Test to see if a double is a finite number (is not NaN or Infinity).
///
/// The value to test.
/// Whether or not the value is a finite number.
public static bool IsFinite(double value)
{
return !double.IsNaN(value) && !double.IsInfinity(value);
}
}