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.
System.Object
System.Exception
System.SystemException
System.ArithmeticException
System.DivideByZeroException
System.NotFiniteNumberException
System.OverflowException
[Visual Basic] <Serializable> Public Class ArithmeticException Inherits SystemException [C#] [Serializable] public class ArithmeticException : SystemException [C++] [Serializable] public __gc class ArithmeticException : public SystemException [JScript] public Serializable 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.
Remarks
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.
Requirements
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