Partager via


Troubleshooting Exceptions: System.MethodAccessException 

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

Associated Tips

  • If the access level of a method in a class library has changed, recompile any assemblies that reference the library.
    This exception typically arises when the caller does not have access permission to the member.

See Also

Tasks

How to: Find Out More About an Exception with the Exception Assistant

Reference

Visual J# Exception Handling for the Debugger
Visual J# Exception Hierarchies
MethodAccessException