12 [__DynamicallyInvokable]
15 private string _fileName;
17 private string _fusionLog;
21 [__DynamicallyInvokable]
24 [__DynamicallyInvokable]
34 [__DynamicallyInvokable]
37 [__DynamicallyInvokable]
48 [SecuritySafeCritical]
57 [__DynamicallyInvokable]
59 : base(
Environment.GetResourceString(
"Arg_BadImageFormatException"))
61 SetErrorCode(-2147024885);
66 [__DynamicallyInvokable]
70 SetErrorCode(-2147024885);
76 [__DynamicallyInvokable]
78 : base(message, inner)
80 SetErrorCode(-2147024885);
86 [__DynamicallyInvokable]
90 SetErrorCode(-2147024885);
98 [__DynamicallyInvokable]
100 : base(message, inner)
102 SetErrorCode(-2147024885);
103 _fileName = fileName;
106 private void SetMessageField()
108 if (_message ==
null)
110 if (_fileName ==
null && base.HResult == -2146233088)
112 _message =
Environment.GetResourceString(
"Arg_BadImageFormatException");
116 _message =
FileLoadException.FormatFileLoadExceptionMessage(_fileName, base.HResult);
123 [__DynamicallyInvokable]
127 if (_fileName !=
null && _fileName.Length != 0)
131 if (base.InnerException !=
null)
133 text = text +
" ---> " + base.InnerException.ToString();
164 : base(info, context)
166 _fileName = info.GetString(
"BadImageFormat_FileName");
169 _fusionLog = info.GetString(
"BadImageFormat_FusionLog");
180 SetErrorCode(hResult);
181 _fileName = fileName;
182 _fusionLog = fusionLog;
193 base.GetObjectData(info, context);
194 info.AddValue(
"BadImageFormat_FileName", _fileName, typeof(
string));
197 info.AddValue(
"BadImageFormat_FusionLog",
FusionLog, typeof(
string));
static string NewLine
Gets the newline string defined for this environment.
Describes a set of security permissions applied to code. This class cannot be inherited.
abstract string FullName
Gets the fully qualified name of the type, including its namespace but not its assembly.
Serves as the base class for system exceptions namespace.
new Type GetType()
Gets the runtime type of the current instance.
Describes the source and destination of a given serialized stream, and provides an additional caller-...
SecurityAction
Specifies the security actions that can be performed using declarative security.
Provides information about, and means to manipulate, the current environment and platform....
virtual string StackTrace
Gets a string representation of the immediate frames on the call stack.
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
The exception that is thrown when a managed assembly is found but cannot be loaded.
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
Specifies that the class can be serialized.
SecurityPermissionFlag
Specifies access flags for the security permission object.
The exception that is thrown when a security error is detected.