summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/ArithmeticException.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/ArithmeticException.cs')
-rw-r--r--src/mscorlib/src/System/ArithmeticException.cs39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/mscorlib/src/System/ArithmeticException.cs b/src/mscorlib/src/System/ArithmeticException.cs
index f5360939cc..081ba454f5 100644
--- a/src/mscorlib/src/System/ArithmeticException.cs
+++ b/src/mscorlib/src/System/ArithmeticException.cs
@@ -11,42 +11,41 @@
**
=============================================================================*/
-namespace System {
-
- using System;
- using System.Runtime.Serialization;
+using System.Runtime.Serialization;
+
+namespace System
+{
// The ArithmeticException is thrown when overflow or underflow
// occurs.
//
- [System.Runtime.InteropServices.ComVisible(true)]
[Serializable]
public class ArithmeticException : SystemException
- {
+ {
// Creates a new ArithmeticException with its message string set to
// the empty string, its HRESULT set to COR_E_ARITHMETIC,
// and its ExceptionInfo reference set to null.
- public ArithmeticException()
- : base(Environment.GetResourceString("Arg_ArithmeticException")) {
- SetErrorCode(__HResults.COR_E_ARITHMETIC);
+ public ArithmeticException()
+ : base(SR.Arg_ArithmeticException)
+ {
+ HResult = __HResults.COR_E_ARITHMETIC;
}
-
+
// Creates a new ArithmeticException with its message string set to
// message, its HRESULT set to COR_E_ARITHMETIC,
// and its ExceptionInfo reference set to null.
//
- public ArithmeticException(String message)
- : base(message) {
- SetErrorCode(__HResults.COR_E_ARITHMETIC);
- }
-
- public ArithmeticException(String message, Exception innerException)
- : base(message, innerException) {
- SetErrorCode(__HResults.COR_E_ARITHMETIC);
+ public ArithmeticException(String message)
+ : base(message)
+ {
+ HResult = __HResults.COR_E_ARITHMETIC;
}
- protected ArithmeticException(SerializationInfo info, StreamingContext context) : base(info, context) {
+ public ArithmeticException(String message, Exception innerException)
+ : base(message, innerException)
+ {
+ HResult = __HResults.COR_E_ARITHMETIC;
}
+ protected ArithmeticException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}
-
}