System.IO.FileNotFoundException.Message Property

Gets the error message that explains the reason for the exception.

Syntax

public override string Message { get; }

Value

A string containing the error message. This string includes the FileNotFoundException.FileName if a value for that property was supplied to the constructor for the current instance.

Remarks

If no message was supplied to the constructor for the current exception, this property returns a system-supplied error message. If the FileLoadException.FileName property is not null, the message includes the file name.

This property is read-only.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0