MethodAccessException.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.
  4. /*=============================================================================
  5. **
  6. **
  7. ** Purpose: The exception class for class loading failures.
  8. **
  9. =============================================================================*/
  10. using System.Runtime.Serialization;
  11. namespace System
  12. {
  13. [Serializable]
  14. [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
  15. public class MethodAccessException : MemberAccessException
  16. {
  17. public MethodAccessException()
  18. : base(SR.Arg_MethodAccessException)
  19. {
  20. HResult = HResults.COR_E_METHODACCESS;
  21. }
  22. public MethodAccessException(string message)
  23. : base(message)
  24. {
  25. HResult = HResults.COR_E_METHODACCESS;
  26. }
  27. public MethodAccessException(string message, Exception inner)
  28. : base(message, inner)
  29. {
  30. HResult = HResults.COR_E_METHODACCESS;
  31. }
  32. protected MethodAccessException(SerializationInfo info, StreamingContext context) : base(info, context)
  33. {
  34. }
  35. }
  36. }