OpenFileDialog.SelectedFile Property

Gets a FileDialogFileInfo object for the selected file. If multiple files are selected, returns the first selected file.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public ReadOnly Property SelectedFile As FileDialogFileInfo
'Usage
Dim instance As OpenFileDialog
Dim value As FileDialogFileInfo

value = instance.SelectedFile
public FileDialogFileInfo SelectedFile { get; }
public:
property FileDialogFileInfo^ SelectedFile {
    FileDialogFileInfo^ get ();
}
public function get SelectedFile () : FileDialogFileInfo

Property Value

Type: System.Windows.Controls.FileDialogFileInfo

The selected file. If multiple files are selected, returns the first selected file.

See Also

Reference

OpenFileDialog Class

OpenFileDialog Members

System.Windows.Controls Namespace

Other Resources

How to: Use the Open File Dialog Box