System.NotFiniteNumberException Class

public class NotFiniteNumberException : ArithmeticException

Base Types

Object
  Exception
    SystemException
      ArithmeticException
        NotFiniteNumberException

Assembly

mscorlib

Library

ExtendedNumerics

Summary

Represents the error that occurs when an arithmetic operation cannot be performed on a floating-point value that is not a finite number.

Description

This exception is thrown when an operand of an arithmetic operation is, and is not permitted to be, one of the following:

[Note: Operations involving Double or Single operations throw this exception.]

See Also

System Namespace

Members

NotFiniteNumberException Constructors

NotFiniteNumberException() Constructor
NotFiniteNumberException(double) Constructor
NotFiniteNumberException(System.String) Constructor
NotFiniteNumberException(System.String, double) Constructor
NotFiniteNumberException(System.String, double, System.Exception) Constructor

NotFiniteNumberException Properties

NotFiniteNumberException.OffendingNumber Property


NotFiniteNumberException() Constructor

public NotFiniteNumberException();

Summary

Constructs and initializes a new instance of the NotFiniteNumberException class.

Description

This constructor initializes the System.NotFiniteNumberException.Message property of the new instance to a system-supplied message that describes the error, such as "The number encountered was not a finite quantity." This message takes into account the current system culture.

This constructor initializes the System.NotFiniteNumberException.OffendingNumber property to zero. The System.NotFiniteNumberException.InnerException property is initialized to null .

See Also

System.NotFiniteNumberException Class, System Namespace

NotFiniteNumberException(double) Constructor

public NotFiniteNumberException(double offendingNumber);

Summary

Constructs and initializes a new instance of the NotFiniteNumberException class.

Parameters

offendingNumber
A Double that specifies the value of the argument that caused the Exception.

Description

This constructor initializes the System.NotFiniteNumberException.Message property of the new instance to a system-supplied message that describes the error, such as "The number encountered was not a finite quantity." This message takes into account the current system culture.

This constructor initializes the System.NotFiniteNumberException.OffendingNumber property using offendingNumber. The System.NotFiniteNumberException.InnerException property is initialized to null .

See Also

System.NotFiniteNumberException Class, System Namespace

NotFiniteNumberException(System.String) Constructor

public NotFiniteNumberException(string message);

Summary

Constructs and initializes a new instance of the NotFiniteNumberException class.

Parameters

message
A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

Description

This constructor initializes the System.NotFiniteNumberException.Message property of the new instance using message , and initializes the System.NotFiniteNumberException.OffendingNumber property to zero. If message is null , the System.NotFiniteNumberException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.

The System.NotFiniteNumberException.InnerException property is initialized to null .

See Also

System.NotFiniteNumberException Class, System Namespace

NotFiniteNumberException(System.String, double) Constructor

public NotFiniteNumberException(string message, double offendingNumber);

Summary

Constructs a new instance of the NotFiniteNumberException class.

Parameters

message
A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
offendingNumber
A Double that specifies the value of the argument that caused the current Exception.

Description

This constructor initializes the System.NotFiniteNumberException.Message property of the new instance using message and the OffendingNumber property using offendingNumber. If message is null , the System.NotFiniteNumberException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.

The System.NotFiniteNumberException.InnerException property is initialized to null .

See Also

System.NotFiniteNumberException Class, System Namespace

NotFiniteNumberException(System.String, double, System.Exception) Constructor

public NotFiniteNumberException(string message, double offendingNumber, Exception innerException);

Summary

Constructs and initializes a new instance of the NotFiniteNumberException class.

Parameters

message
A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
offendingNumber
A Double that specifies the value of the argument that caused the current exception.
innerException
An instance of Exception that is the cause of the current exception. If innerException is non-null, then the current exception was raised in a catch block handling innerException.

Description

This constructor initializes the System.NotFiniteNumberException.Message property of the new instance using message, the System.NotFiniteNumberException.OffendingNumber property using offendingNumber, and the System.NotFiniteNumberException.InnerException property using innerException. If message is null , the System.NotFiniteNumberException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.

[Note: For information on inner exceptions, see System.Exception.InnerException.]

See Also

System.NotFiniteNumberException Class, System Namespace

NotFiniteNumberException.OffendingNumber Property

public double OffendingNumber { get; }

Summary

Gets the value of the argument that caused the current Exception.

Property Value

A Double that contains the invalid value.

Description

This property is read-only.

The System.NotFiniteNumberException.OffendingNumber property returns the same value as was passed into the constructor, or zero if no value was supplied.

See Also

System.NotFiniteNumberException Class, System Namespace