Fix IDE0025 (use expression body for properties)
[mono-project.git] / netcore / System.Private.CoreLib / shared / System / MissingMethodException.cs
blob05436df2f13e3b95b6286bb55383699b98ef4fb0
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 class loading failures.
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 class MissingMethodException : MissingMemberException
22 public MissingMethodException()
23 : base(SR.Arg_MissingMethodException)
25 HResult = HResults.COR_E_MISSINGMETHOD;
28 public MissingMethodException(string? message)
29 : base(message)
31 HResult = HResults.COR_E_MISSINGMETHOD;
34 public MissingMethodException(string? message, Exception? inner)
35 : base(message, inner)
37 HResult = HResults.COR_E_MISSINGMETHOD;
40 public MissingMethodException(string? className, string? methodName)
42 ClassName = className;
43 MemberName = methodName;
46 protected MissingMethodException(SerializationInfo info, StreamingContext context)
47 : base(info, context)
51 public override string Message =>
52 ClassName == null ?
53 base.Message :
54 SR.Format(SR.MissingMethod_Name, ClassName + "." + MemberName +
55 (Signature != null ? " " + FormatSignature(Signature) : string.Empty));