Name

ArithmeticException

Synopsis

This is the base class for all math-related exceptions. You can throw this class from your own code, but use a subclass (if one exists) that specifically addresses the type of error you have encountered.

public class ArithmeticException : SystemException {
// Public Constructors
   public ArithmeticException( );
   public ArithmeticException(string message);
   public ArithmeticException(string message, Exception innerException);
// Protected Constructors
   protected ArithmeticException(System.Runtime.Serialization.SerializationInfo info, 
        System.Runtime.Serialization.StreamingContext context);
}

Hierarchy

Object Exception(System.Runtime.Serialization.ISerializable) SystemException ArithmeticException

Subclasses

DivideByZeroException, NotFiniteNumberException, OverflowException

Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.