3 // Copyright (c) Microsoft Corporation. All rights reserved.
6 ////////////////////////////////////////////////////////////////////////////////
7 ////////////////////////////////////////////////////////////////////////////////
9 // TargetException is thrown when the target to an Invoke is invalid. This may
11 // <OWNER>Microsoft</OWNER>
12 // occur because the caller doesn't have access to the member, or the target doesn't
13 // define the member, etc.
18 namespace System.Reflection {
21 using System.Runtime.Serialization;
23 [System.Runtime.InteropServices.ComVisible(true)]
25 public class TargetException : Exception {
27 public class TargetException : ApplicationException {
28 #endif //FEATURE_CORECLR
29 public TargetException() : base() {
30 SetErrorCode(__HResults.COR_E_TARGET);
33 public TargetException(String message) : base(message) {
34 SetErrorCode(__HResults.COR_E_TARGET);
37 public TargetException(String message, Exception inner) : base(message, inner) {
38 SetErrorCode(__HResults.COR_E_TARGET);
41 protected TargetException(SerializationInfo info, StreamingContext context) : base (info, context) {