public class NotFiniteNumberException : ArithmeticException
Object
Exception
SystemException
ArithmeticException
NotFiniteNumberException
mscorlib
ExtendedNumerics
Represents the error that occurs when an arithmetic operation cannot be performed on a floating-point value that is not a finite number.
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.]
- Positive infinity
- Negative infinity
- NaN (Not-a-Number)
System Namespace
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
public NotFiniteNumberException();
Constructs and initializes a new instance of the NotFiniteNumberException class.
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
.
System.NotFiniteNumberException Class, System Namespace
public NotFiniteNumberException(double offendingNumber);
Constructs and initializes a new instance of the NotFiniteNumberException class.
- offendingNumber
- A Double that specifies the value of the argument that caused the Exception.
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
.
System.NotFiniteNumberException Class, System Namespace
public NotFiniteNumberException(string message);
Constructs and initializes a new instance of the NotFiniteNumberException class.
- 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.
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 isnull
, 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
.
System.NotFiniteNumberException Class, System Namespace
public NotFiniteNumberException(string message, double offendingNumber);
Constructs a new instance of the NotFiniteNumberException class.
- 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.
This constructor initializes the System.NotFiniteNumberException.Message property of the new instance using message and theOffendingNumber
property using offendingNumber. If message isnull
, 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
.
System.NotFiniteNumberException Class, System Namespace
public NotFiniteNumberException(string message, double offendingNumber, Exception innerException);
Constructs and initializes a new instance of the NotFiniteNumberException class.
- 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.
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 isnull
, 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.]
System.NotFiniteNumberException Class, System Namespace
public double OffendingNumber { get; }
Gets the value of the argument that caused the current Exception.
A Double that contains the invalid value.
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.
System.NotFiniteNumberException Class, System Namespace