public class MissingFieldException : MissingMemberException
Object
Exception
SystemException
MemberAccessException
MissingMemberException
MissingFieldException
mscorlib
RuntimeInfrastructure
Represents the error that occurs when there is an attempt to dynamically access a field that does not exist.
Normally a compilation error is generated if code attempts to access a nonexistent member of a class. MissingFieldException is designed to handle cases where an attempt is made to dynamically access a renamed or deleted field of an assembly that is not referenced by its strong name. The MissingFieldException is thrown when code in a dependent assembly attempts to access a missing field in an assembly that was modified.[Note: The following CIL instructions throw MissingFieldException:
]
- ldfld
- ldflda
- ldsflda
- stfld
- stsfld
System Namespace
MissingFieldException Constructors
MissingFieldException() Constructor
MissingFieldException(System.String) Constructor
MissingFieldException(System.String, System.Exception) Constructor
public MissingFieldException();
Constructs and initializes new instance of the MissingFieldException class.
This constructor initializes the System.MissingFieldException.Message property of the new instance to a system-supplied message that describes the error, such as "Attempted to access a nonexistent field." This message takes into account the current system culture.The System.MissingFieldException.InnerException property of the new instance is initialized to
null
.
System.MissingFieldException Class, System Namespace
public MissingFieldException(string message);
Constructs and initializes a new instance of the MissingFieldException 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.MissingFieldException.Message property of the new instance using message. If message isnull
, the System.MissingFieldException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.The System.MissingFieldException.InnerException property of the new instance is initialized to
null
.
System.MissingFieldException Class, System Namespace
public MissingFieldException(string message, Exception inner);
Constructs and initializes a new instance of the MissingFieldException 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, the current exception was raised in a catch block handling inner .
This constructor initializes the System.MissingFieldException.Message property of the new instance using message and the System.MissingFieldException.InnerException property using inner. If message isnull
, the System.MissingFieldException.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.MissingFieldException Class, System Namespace