public sealed class InvalidProgramException : SystemException
Object
Exception
SystemException
InvalidProgramException
mscorlib
BCL
Represents the error that occurs when a program contains invalid CIL instructions or metadata.
[Note: This exception is thrown by the system when a compiler emits incorrect CIL or metadata.]
System Namespace
InvalidProgramException Constructors
InvalidProgramException() Constructor
InvalidProgramException(System.String) Constructor
InvalidProgramException(System.String, System.Exception) Constructor
public InvalidProgramException();
Constructs and initializes a new instance of the InvalidProgramException class.
This constructor initializes the System.InvalidProgramException.Message property of the new instance to a system-supplied message that describes the error, such as "Metadata is incorrect." This message takes into account the current system culture.The System.InvalidProgramException.InnerException property is initialized to
null
.
System.InvalidProgramException Class, System Namespace
public InvalidProgramException(string message);
Constructs and initializes a new instance of the InvalidProgramException 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.InvalidProgramException.Message property of the new instance using message. If message isnull
, the System.InvalidProgramException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments. The System.InvalidProgramException.InnerException property is initialized tonull
.
System.InvalidProgramException Class, System Namespace
public InvalidProgramException(string message, Exception inner);
Constructs and initializes a new instance of the InvalidProgramException 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 non-null, then the current Exception was raised in a catch block handling inner .
This constructor initializes the System.InvalidProgramException.Message property of the new instance using message, and the System.InvalidProgramException.InnerException property using inner. If message isnull
, the System.InvalidProgramException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.[Note: For information on inner exceptions, see System.Exception.InnerException.]
System.InvalidProgramException Class, System Namespace