Fix IDE0025 (use expression body for properties)
[mono-project.git] / netcore / System.Private.CoreLib / shared / System / InvalidProgramException.cs
blobd20391beb02fecb4908b612691ff596eeeb01234
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: The exception class for programs with invalid IL or bad metadata.
12 =============================================================================*/
14 using System.Runtime.Serialization;
16 namespace System
18 [Serializable]
19 [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
20 public sealed class InvalidProgramException : SystemException
22 public InvalidProgramException()
23 : base(SR.InvalidProgram_Default)
25 HResult = HResults.COR_E_INVALIDPROGRAM;
28 public InvalidProgramException(string? message)
29 : base(message)
31 HResult = HResults.COR_E_INVALIDPROGRAM;
34 public InvalidProgramException(string? message, Exception? inner)
35 : base(message, inner)
37 HResult = HResults.COR_E_INVALIDPROGRAM;
40 private InvalidProgramException(SerializationInfo info, StreamingContext context) : base(info, context) { }