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

Gets the name of the file that cannot be found.

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

Property Value

A String containing the name of the file, or a null reference (Nothing in Visual Basic) if no file name was passed to the constructor for this instance.

Remarks

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, 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:
© 2017 Microsoft