public class MemberAccessException : SystemException
Object
Exception
SystemException
MemberAccessException
mscorlib
RuntimeInfrastructure
MemberAccessException is the base class for exceptions that occurs when an attempt to locate or access a type member fails.
[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.
]
System Namespace
MemberAccessException Constructors
MemberAccessException() Constructor
MemberAccessException(System.String) Constructor
MemberAccessException(System.String, System.Exception) Constructor
public MemberAccessException();
Constructs and initializes a new instance of the MemberAccessException class.
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
.
System.MemberAccessException Class, System Namespace
public MemberAccessException(string message);
Constructs and initializes a new instance of the MemberAccessException class.
- 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.
This constructor initializes the System.MemberAccessException.Message property of the new instance using message. If message isnull
, 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
.
System.MemberAccessException Class, System Namespace
public MemberAccessException(string message, Exception inner);
Constructs and initializes a new instance of the MemberAccessException class.
- 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 .
This constructor initializes the System.MemberAccessException.Message property of the new instance using message and the System.MemberAccessException.InnerException property using inner. If message isnull
, 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.]
System.MemberAccessException Class, System Namespace