Export (0) Print
Expand All

MethodAccessException Class

The exception that is thrown when there is an invalid attempt to access a private or protected method inside a class.

For a list of all members of this type, see MethodAccessException Members.

System.Object
   System.Exception
      System.SystemException
         System.MemberAccessException
            System.MethodAccessException

[Visual Basic]
<Serializable>
Public Class MethodAccessException
   Inherits MemberAccessException
[C#]
[Serializable]
public class MethodAccessException : MemberAccessException
[C++]
[Serializable]
public __gc class MethodAccessException : public
   MemberAccessException
[JScript]
public
   Serializable
class MethodAccessException extends MemberAccessException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

This exception is typically thrown when the access level of a method in a class library is changed, and one or more assemblies referencing the library have not been recompiled.

MethodAccessException uses the HRESULT COR_E_METHODACCESS, that has the value 0x80131510.

For a list of initial property values for an instance of MethodAccessException, see the MethodAccessException constructors.

Requirements

Namespace: System

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Mscorlib (in Mscorlib.dll)

See Also

MethodAccessException Members | System Namespace | Exception | Handling and Throwing Exceptions

Show:
© 2014 Microsoft