Gets or sets a string containing the file name selected in the file dialog box.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The file name includes both the file path and the extension. If no files are selected, this method returns an empty string ("").
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 FileNames.
The following code example demonstrates using the RichTextBox.SaveFile and RichTextBox.LoadFile methods with streams. It also demonstrates using the , DefaultExt, SaveFileDialog.CreatePrompt, and SaveFileDialog.OverwritePrompt members.
This is a complete example that is ready to run when you copy it to your project.
Available since 1.1