Fix IDE0025 (use expression body for properties)
[mono-project.git] / netcore / System.Private.CoreLib / shared / System / ArithmeticException.cs
blobb80a51247e7c747d89460c9216220a6628715e77
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 /*=============================================================================
6 **
7 **
8 **
9 ** Purpose: Exception class for bad arithmetic conditions!
12 =============================================================================*/
14 using System.Runtime.Serialization;
16 namespace System
18 // The ArithmeticException is thrown when overflow or underflow
19 // occurs.
20 [Serializable]
21 [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
22 public class ArithmeticException : SystemException
24 // Creates a new ArithmeticException with its message string set to
25 // the empty string, its HRESULT set to COR_E_ARITHMETIC,
26 // and its ExceptionInfo reference set to null.
27 public ArithmeticException()
28 : base(SR.Arg_ArithmeticException)
30 HResult = HResults.COR_E_ARITHMETIC;
33 // Creates a new ArithmeticException with its message string set to
34 // message, its HRESULT set to COR_E_ARITHMETIC,
35 // and its ExceptionInfo reference set to null.
37 public ArithmeticException(string? message)
38 : base(message)
40 HResult = HResults.COR_E_ARITHMETIC;
43 public ArithmeticException(string? message, Exception? innerException)
44 : base(message, innerException)
46 HResult = HResults.COR_E_ARITHMETIC;
49 protected ArithmeticException(SerializationInfo info, StreamingContext context) : base(info, context)