Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FileNotFoundException.Message Property

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

[Visual Basic]
Overrides Public ReadOnly Property Message As String
[C#]
public override string Message {get;}
[C++]
public: __property String* get_Message();
[JScript]
public override function get Message() : String;

Property Value

A string containing the error message.

Remarks

If no message was supplied to the constructor for the current exception, this property returns a system-supplied error message. If the FileName property is not a null reference (Nothing in Visual Basic), the message includes the file name.

This property is read-only.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

FileNotFoundException Class | FileNotFoundException Members | System.IO Namespace | Working with I/O | Reading Text from a File | Writing Text to a File

Show:
© 2014 Microsoft