Windows apps
Collapse the table of content
Expand the table of content
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.

FileLoadException.Message Property

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

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

Property Value

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


This property overrides Message.

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, the message includes the file name, for example, "Unable to load file a FileName." (a FileName represents the value returned by FileName.) If FileName is a null reference (Nothing in Visual Basic), this is indicated in the system-supplied message as "(null)". The system-supplied message takes into account the current system culture.

This property is read-only.


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

See Also

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

© 2018 Microsoft