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.

FileNotFoundException.FileName Property

Gets the name of the file that cannot be found.

[Visual Basic]
Public ReadOnly Property FileName As String
public string FileName {get;}
public: __property String* get_FileName();
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.


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

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

© 2017 Microsoft