System.InvalidProgramException Class

public sealed class InvalidProgramException : SystemException

Base Types

Object
  Exception
    SystemException
      InvalidProgramException

Assembly

mscorlib

Library

BCL

Summary

Represents the error that occurs when a program contains invalid CIL instructions or metadata.

Description

[Note: This exception is thrown by the system when a compiler emits incorrect CIL or metadata.]

See Also

System Namespace

Members

InvalidProgramException Constructors

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


InvalidProgramException() Constructor

public InvalidProgramException();

Summary

Constructs and initializes a new instance of the InvalidProgramException class.

Description

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 .

See Also

System.InvalidProgramException Class, System Namespace

InvalidProgramException(System.String) Constructor

public InvalidProgramException(string message);

Summary

Constructs and initializes a new instance of the InvalidProgramException 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.InvalidProgramException.Message property of the new instance using message. If message is null , 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 to null .

See Also

System.InvalidProgramException Class, System Namespace

InvalidProgramException(System.String, System.Exception) Constructor

public InvalidProgramException(string message, Exception inner);

Summary

Constructs and initializes a new instance of the InvalidProgramException 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 non-null, then the current Exception was raised in a catch block handling inner .

Description

This constructor initializes the System.InvalidProgramException.Message property of the new instance using message, and the System.InvalidProgramException.InnerException property using inner. If message is null , 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.]

See Also

System.InvalidProgramException Class, System Namespace