This documentation is archived and is not being maintained.

MethodAccessException Constructor

.NET Framework 1.1

Initializes a new instance of the MethodAccessException class.

Overload List

Initializes a new instance of the MethodAccessException class, setting the Message property of the new instance to a system-supplied message that describes the error, such as "Attempt to access the method failed." This message takes into account the current system culture.

[Visual Basic] Public Sub New()
[C#] public MethodAccessException();
[C++] public: MethodAccessException();
[JScript] public function MethodAccessException();

Initializes a new instance of the MethodAccessException class with a specified error message.

[Visual Basic] Public Sub New(String)
[C#] public MethodAccessException(string);
[C++] public: MethodAccessException(String*);
[JScript] public function MethodAccessException(String);

Initializes a new instance of the MethodAccessException class with serialized data.

[Visual Basic] Protected Sub New(SerializationInfo, StreamingContext)
[C#] protected MethodAccessException(SerializationInfo, StreamingContext);
[C++] protected: MethodAccessException(SerializationInfo*, StreamingContext);
[JScript] protected function MethodAccessException(SerializationInfo, StreamingContext);

Initializes a new instance of the MethodAccessException class with a specified error message and a reference to the inner exception that is the cause of this exception.

[Visual Basic] Public Sub New(String, Exception)
[C#] public MethodAccessException(string, Exception);
[C++] public: MethodAccessException(String*, Exception*);
[JScript] public function MethodAccessException(String, Exception);

See Also

MethodAccessException Class | MethodAccessException Members | System Namespace

Show: