xtd 0.2.0
Loading...
Searching...
No Matches

◆ file_name() [1/2]

virtual const xtd::string & xtd::forms::file_dialog::file_name ( ) const
virtualnoexcept

Gets a string containing the file name selected in the file dialog box.

Returns
The file name selected in the file dialog box. The default value is an empty string ("").
Remarks
The file name includes both the file path and the extension. If no files are selected, this method returns an empty string ("").
When used from the save_file_dialog class, this property represents the file being saved; when used from the open_file_dialog class, it represents the file being opened.
This property can only be the name of one selected file. If you want to return an array containing the names of all selected files in a multiple-selection dialog box, use file_names.
Examples
painting.cpp.