11 [__DynamicallyInvokable]
14 private string _fileName;
16 private string _fusionLog;
20 [__DynamicallyInvokable]
23 [__DynamicallyInvokable]
33 [__DynamicallyInvokable]
36 [__DynamicallyInvokable]
48 [SecuritySafeCritical]
57 [__DynamicallyInvokable]
59 : base(
Environment.GetResourceString(
"IO.FileNotFound"))
61 SetErrorCode(-2147024894);
66 [__DynamicallyInvokable]
70 SetErrorCode(-2147024894);
76 [__DynamicallyInvokable]
78 : base(message, innerException)
80 SetErrorCode(-2147024894);
86 [__DynamicallyInvokable]
90 SetErrorCode(-2147024894);
98 [__DynamicallyInvokable]
100 : base(message, innerException)
102 SetErrorCode(-2147024894);
103 _fileName = fileName;
106 private void SetMessageField()
108 if (_message ==
null)
110 if (_fileName ==
null && base.HResult == -2146233088)
112 _message =
Environment.GetResourceString(
"IO.FileNotFound");
114 else if (_fileName !=
null)
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(
"FileNotFound_FileName");
169 _fusionLog = info.GetString(
"FileNotFound_FusionLog");
180 SetErrorCode(hResult);
181 _fileName = fileName;
182 _fusionLog = fusionLog;
192 base.GetObjectData(info, context);
193 info.AddValue(
"FileNotFound_FileName", _fileName, typeof(
string));
196 info.AddValue(
"FileNotFound_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.
FileNotFoundException(string message, string fileName, Exception innerException)
Initializes a new instance of the T:System.IO.FileNotFoundException class with a specified error mess...
abstract string FullName
Gets the fully qualified name of the type, including its namespace but not its assembly.
new Type GetType()
Gets the runtime type of the current instance.
FileNotFoundException(string message, Exception innerException)
Initializes a new instance of the T:System.IO.FileNotFoundException class with a specified error mess...
FileNotFoundException(SerializationInfo info, StreamingContext context)
Initializes a new instance of the T:System.IO.FileNotFoundException class with the specified serializ...
Describes the source and destination of a given serialized stream, and provides an additional caller-...
override void GetObjectData(SerializationInfo info, StreamingContext context)
Sets the T:System.Runtime.Serialization.SerializationInfo object with the file name and additional ex...
string FileName
Gets the name of the file that cannot be found.
SecurityAction
Specifies the security actions that can be performed using declarative security.
Provides information about, and means to manipulate, the current environment and platform....
FileNotFoundException()
Initializes a new instance of the T:System.IO.FileNotFoundException class with its message string set...
string FusionLog
Gets the log file that describes why loading of an assembly failed.
virtual string StackTrace
Gets a string representation of the immediate frames on the call stack.
The exception that is thrown when an I/O error occurs.
override string Message
Gets the error message that explains the reason for the exception.
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
FileNotFoundException(string message, string fileName)
Initializes a new instance of the T:System.IO.FileNotFoundException class with its message string set...
The exception that is thrown when an attempt to access a file that does not exist on disk fails.
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
Specifies that the class can be serialized.
override string ToString()
Returns the fully qualified name of this exception and possibly the error message,...
SecurityPermissionFlag
Specifies access flags for the security permission object.
The exception that is thrown when a security error is detected.
FileNotFoundException(string message)
Initializes a new instance of the T:System.IO.FileNotFoundException class with its message string set...