ArithmeticException Class
Collapse the table of content
Expand the table of content

ArithmeticException Class

The exception that is thrown for errors in an arithmetic, casting, or conversion operation.

For a list of all members of this type, see ArithmeticException Members.


[Visual Basic]
Public Class ArithmeticException
   Inherits SystemException
public class ArithmeticException : SystemException
public __gc class ArithmeticException : public SystemException
class ArithmeticException extends SystemException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


ArithmeticException is the base class for DivideByZeroException, NotFiniteNumberException, and OverflowException. In general, use one of the derived classes of ArithmeticException to more precisely indicate the exact nature of the error. Throw an ArithmeticException if you are only interested in capturing a general arithmetic error.

ArithmeticException uses the HRESULT COR_E_ARITHMETIC, which has the value 0x80070216.

For a list of initial property values for an instance of ArithmeticException, see the ArithmeticException constructors.


Namespace: System

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: Mscorlib (in Mscorlib.dll)

See Also

ArithmeticException Members | System Namespace | Exception | Handling and Throwing Exceptions

© 2015 Microsoft