Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft