Share via


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

public FileDialogFileInfo SelectedFile { get; }

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