Updates referencesource to .NET 4.7
[mono-project.git] / mcs / class / referencesource / mscorlib / system / reflection / targetparametercountexception.cs
blob60007d1cd258ed3f87b97df3d4c3affe04a87d23
1 // ==++==
2 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 //
5 // ==--==
6 ////////////////////////////////////////////////////////////////////////////////
7 ////////////////////////////////////////////////////////////////////////////////
8 //
9 // TargetParameterCountException is thrown when the number of parameter to an
10 //
11 // <OWNER>Microsoft</OWNER>
12 // invocation doesn't match the number expected.
14 //
15 //
17 namespace System.Reflection {
19 using System;
20 using SystemException = System.SystemException;
21 using System.Runtime.Serialization;
22 [Serializable]
23 [System.Runtime.InteropServices.ComVisible(true)]
24 #if FEATURE_CORECLR
25 public sealed class TargetParameterCountException : Exception {
26 #else
27 public sealed class TargetParameterCountException : ApplicationException {
28 #endif //FEATURE_CORECLR
29 public TargetParameterCountException()
30 : base(Environment.GetResourceString("Arg_TargetParameterCountException")) {
31 SetErrorCode(__HResults.COR_E_TARGETPARAMCOUNT);
34 public TargetParameterCountException(String message)
35 : base(message) {
36 SetErrorCode(__HResults.COR_E_TARGETPARAMCOUNT);
39 public TargetParameterCountException(String message, Exception inner)
40 : base(message, inner) {
41 SetErrorCode(__HResults.COR_E_TARGETPARAMCOUNT);
44 internal TargetParameterCountException(SerializationInfo info, StreamingContext context) : base (info, context) {