FileDialog.FileName Property


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

 property System::String ^ FileName { System::String ^ get(); void set(System::String ^ value); };
[get: System.Security.SecurityCritical]
[set: System.Security.SecurityCritical]
public string FileName { get; set; }
member this.FileName : string with get, set
Public Property FileName As 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 file name is selected (length of FileNames is greater than one) then FileName contains the first selected file name. If no file name is selected, this property contains Empty rather than null.


to either get or set the path in the dialog. Associated enumeration: Unrestricted

Applies to

See also