FileDialog.FileName Property

Gets or sets a string containing the full path of the file selected in a file dialog.

Namespace: Microsoft.Win32
Assembly: PresentationFramework (in presentationframework.dll)

public string FileName { get; set; }
/** @property */
public String get_FileName ()

/** @property */
public void set_FileName (String value)

public function get FileName () : String

public function set FileName (value : String)

<object FileName="string" .../>

Property Value

A String that is the full path of the file selected in the file dialog. The default is Empty.

If more than one filename is selected (length of FileNames is greater than one) then FileName contains the first selected filename. If no filename is selected, this property contains Empty rather than a a null reference (Nothing in Visual Basic)String.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions