mscorlib(4.0.0.0) API with additions
System.BadImageFormatException Class Reference

The exception that is thrown when the file image of a dynamic link library (DLL) or an executable program is invalid. More...

Inheritance diagram for System.BadImageFormatException:
[legend]
Collaboration diagram for System.BadImageFormatException:
[legend]

Public Member Functions

 BadImageFormatException ()
 Initializes a new instance of the T:System.BadImageFormatException class. More...
 
 BadImageFormatException (string message)
 Initializes a new instance of the T:System.BadImageFormatException class with a specified error message. More...
 
 BadImageFormatException (string message, Exception inner)
 Initializes a new instance of the T:System.BadImageFormatException class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
 BadImageFormatException (string message, string fileName)
 Initializes a new instance of the T:System.BadImageFormatException class with a specified error message and file name. More...
 
 BadImageFormatException (string message, string fileName, Exception inner)
 Initializes a new instance of the T:System.BadImageFormatException class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
override string ToString ()
 Returns the fully qualified name of this exception and possibly the error message, the name of the inner exception, and the stack trace. More...
 
override void GetObjectData (SerializationInfo info, StreamingContext context)
 Sets the T:System.Runtime.Serialization.SerializationInfo object with the file name, assembly cache log, and additional exception information. More...
 
- Public Member Functions inherited from System.SystemException
 SystemException ()
 Initializes a new instance of the T:System.SystemException class. More...
 
 SystemException (string message)
 Initializes a new instance of the T:System.SystemException class with a specified error message. More...
 
 SystemException (string message, Exception innerException)
 Initializes a new instance of the T:System.SystemException class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
- Public Member Functions inherited from System.Exception
 Exception ()
 Initializes a new instance of the T:System.Exception class. More...
 
 Exception (string message)
 Initializes a new instance of the T:System.Exception class with a specified error message. More...
 
 Exception (string message, Exception innerException)
 Initializes a new instance of the T:System.Exception class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
virtual Exception GetBaseException ()
 When overridden in a derived class, returns the T:System.Exception that is the root cause of one or more subsequent exceptions. More...
 
override string ToString ()
 Creates and returns a string representation of the current exception. More...
 
new Type GetType ()
 Gets the runtime type of the current instance. More...
 
- Public Member Functions inherited from System.Runtime.InteropServices._Exception
new bool Equals (object obj)
 Provides COM objects with version-independent access to the M:System.Object.Equals(System.Object) method. More...
 
new int GetHashCode ()
 Provides COM objects with version-independent access to the M:System.Object.GetHashCode method. More...
 

Protected Member Functions

 BadImageFormatException (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.BadImageFormatException class with serialized data. More...
 
- Protected Member Functions inherited from System.SystemException
 SystemException (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.SystemException class with serialized data. More...
 
- Protected Member Functions inherited from System.Exception
 Exception (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.Exception class with serialized data. More...
 

Properties

override string Message [get]
 Gets the error message and the name of the file that caused this exception. More...
 
string FileName [get]
 Gets the name of the file that causes this exception. More...
 
string FusionLog [get]
 Gets the log file that describes why an assembly load failed. More...
 
- Properties inherited from System.Exception
virtual string Message [get]
 Gets a message that describes the current exception. More...
 
virtual IDictionary Data [get]
 Gets a collection of key/value pairs that provide additional user-defined information about the exception. More...
 
Exception InnerException [get]
 Gets the T:System.Exception instance that caused the current exception. More...
 
MethodBase TargetSite [get]
 Gets the method that throws the current exception. More...
 
virtual string StackTrace [get]
 Gets a string representation of the immediate frames on the call stack. More...
 
virtual string HelpLink [get, set]
 Gets or sets a link to the help file associated with this exception. More...
 
virtual string Source [get, set]
 Gets or sets the name of the application or the object that causes the error. More...
 
int HResult [get, protected set]
 Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. More...
 
EventHandler< SafeSerializationEventArgsSerializeObjectState
 Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. More...
 
- Properties inherited from System.Runtime.InteropServices._Exception
string Message [get]
 Provides COM objects with version-independent access to the P:System.Exception.Message property. More...
 
string StackTrace [get]
 Provides COM objects with version-independent access to the P:System.Exception.StackTrace property. More...
 
string HelpLink [get, set]
 Provides COM objects with version-independent access to the P:System.Exception.HelpLink property. More...
 
string Source [get, set]
 Provides COM objects with version-independent access to the P:System.Exception.Source property. More...
 
Exception InnerException [get]
 Provides COM objects with version-independent access to the P:System.Exception.InnerException property. More...
 
MethodBase TargetSite [get]
 Provides COM objects with version-independent access to the P:System.Exception.TargetSite property. More...
 

Detailed Description

The exception that is thrown when the file image of a dynamic link library (DLL) or an executable program is invalid.

Definition at line 13 of file BadImageFormatException.cs.

Constructor & Destructor Documentation

◆ BadImageFormatException() [1/6]

System.BadImageFormatException.BadImageFormatException ( )

Initializes a new instance of the T:System.BadImageFormatException class.

Definition at line 58 of file BadImageFormatException.cs.

◆ BadImageFormatException() [2/6]

System.BadImageFormatException.BadImageFormatException ( string  message)

Initializes a new instance of the T:System.BadImageFormatException class with a specified error message.

Parameters
messageThe message that describes the error.

Definition at line 67 of file BadImageFormatException.cs.

◆ BadImageFormatException() [3/6]

System.BadImageFormatException.BadImageFormatException ( string  message,
Exception  inner 
)

Initializes a new instance of the T:System.BadImageFormatException class with a specified error message and a reference to the inner exception that is the cause of this exception.

Parameters
messageThe error message that explains the reason for the exception.
innerThe exception that is the cause of the current exception. If the inner parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.

Definition at line 77 of file BadImageFormatException.cs.

◆ BadImageFormatException() [4/6]

System.BadImageFormatException.BadImageFormatException ( string  message,
string  fileName 
)

Initializes a new instance of the T:System.BadImageFormatException class with a specified error message and file name.

Parameters
messageA message that describes the error.
fileNameThe full name of the file with the invalid image.

Definition at line 87 of file BadImageFormatException.cs.

◆ BadImageFormatException() [5/6]

System.BadImageFormatException.BadImageFormatException ( string  message,
string  fileName,
Exception  inner 
)

Initializes a new instance of the T:System.BadImageFormatException class with a specified error message and a reference to the inner exception that is the cause of this exception.

Parameters
messageThe error message that explains the reason for the exception.
fileNameThe full name of the file with the invalid image.
innerThe exception that is the cause of the current exception. If the inner parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Definition at line 99 of file BadImageFormatException.cs.

◆ BadImageFormatException() [6/6]

System.BadImageFormatException.BadImageFormatException ( SerializationInfo  info,
StreamingContext  context 
)
protected

Initializes a new instance of the T:System.BadImageFormatException class with serialized data.

Parameters
infoThe T:System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.
contextThe T:System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.

Definition at line 163 of file BadImageFormatException.cs.

Member Function Documentation

◆ GetObjectData()

override void System.BadImageFormatException.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)
virtual

Sets the T:System.Runtime.Serialization.SerializationInfo object with the file name, assembly cache log, and additional exception information.

Parameters
infoThe T:System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.
contextThe T:System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.
Exceptions
T:System.Security.SecurityExceptionThe caller does not have the required permission.

Reimplemented from System.Exception.

Definition at line 191 of file BadImageFormatException.cs.

◆ ToString()

override string System.BadImageFormatException.ToString ( )

Returns the fully qualified name of this exception and possibly the error message, the name of the inner exception, and the stack trace.

Returns
A string containing the fully qualified name of this exception and possibly the error message, the name of the inner exception, and the stack trace.

Implements System.Runtime.InteropServices._Exception.

Definition at line 124 of file BadImageFormatException.cs.

Property Documentation

◆ FileName

string System.BadImageFormatException.FileName
get

Gets the name of the file that causes this exception.

Returns
The name of the file with the invalid image, or a null reference if no file name was passed to the constructor for the current instance.

Definition at line 36 of file BadImageFormatException.cs.

◆ FusionLog

string System.BadImageFormatException.FusionLog
get

Gets the log file that describes why an assembly load failed.

Returns
A String containing errors reported by the assembly cache.

Definition at line 47 of file BadImageFormatException.cs.

◆ Message

override string System.BadImageFormatException.Message
get

Gets the error message and the name of the file that caused this exception.

Returns
A string containing the error message and the name of the file that caused this exception.

Definition at line 23 of file BadImageFormatException.cs.


The documentation for this class was generated from the following file: