Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / mscorlib / system / reflection / targetparametercountexception.cs
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>[....]</OWNER>
12 //    invocation doesn't match the number expected.
13 //
14 // 
15 // 
16 //
17 namespace System.Reflection {
18
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);
32         }
33     
34         public TargetParameterCountException(String message) 
35             : base(message) {
36             SetErrorCode(__HResults.COR_E_TARGETPARAMCOUNT);
37         }
38         
39         public TargetParameterCountException(String message, Exception inner)  
40             : base(message, inner) {
41             SetErrorCode(__HResults.COR_E_TARGETPARAMCOUNT);
42         }
43
44         internal TargetParameterCountException(SerializationInfo info, StreamingContext context) : base (info, context) {
45         }
46     }
47 }