System.MemberAccessException Class

public class MemberAccessException : SystemException

Base Types

Object
  Exception
    SystemException
      MemberAccessException

Assembly

mscorlib

Library

RuntimeInfrastructure

Summary

MemberAccessException is the base class for exceptions that occurs when an attempt to locate or access a type member fails.

Description

[Note: MemberAccessException exceptions are typically thrown by the system when members in a class library have been changed or removed, and an assembly that references the class library has not been recompiled.

The Base Class Library includes the following derived types:

When appropriate, use these types instead of MemberAccessException.

]

See Also

System Namespace

Members

MemberAccessException Constructors

MemberAccessException() Constructor
MemberAccessException(System.String) Constructor
MemberAccessException(System.String, System.Exception) Constructor


MemberAccessException() Constructor

public MemberAccessException();

Summary

Constructs and initializes a new instance of the MemberAccessException class.

Description

This constructor initializes the System.MemberAccessException.Message property of the new instance to a system-supplied message that describes the error, such as "Cannot access member." This message takes into account the current system culture.

The System.MemberAccessException.InnerException property of the new instance is initialized to null .

See Also

System.MemberAccessException Class, System Namespace

MemberAccessException(System.String) Constructor

public MemberAccessException(string message);

Summary

Constructs and initializes a new instance of the MemberAccessException class.

Parameters

message
A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

Description

This constructor initializes the System.MemberAccessException.Message property of the new instance using message. If message is null , the System.MemberAccessException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.

The System.MemberAccessException.InnerException property of the new instance is initialized to null .

See Also

System.MemberAccessException Class, System Namespace

MemberAccessException(System.String, System.Exception) Constructor

public MemberAccessException(string message, Exception inner);

Summary

Constructs and initializes a new instance of the MemberAccessException class.

Parameters

message
A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
inner
An instance of Exception that is the cause of the current exception. If inner is not a null reference, then the current Exception was raised in a catch block handling inner .

Description

This constructor initializes the System.MemberAccessException.Message property of the new instance using message and the System.MemberAccessException.InnerException property using inner. If message is null , the System.MemberAccessException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.

[Note: For more information on inner exceptions, see System.Exception.InnerException.]

See Also

System.MemberAccessException Class, System Namespace