System.Windows.Forms.OpenFileDialog Class

Prompts the user to open a file. This class cannot be inherited.

See Also: OpenFileDialog Members

Syntax

public sealed class OpenFileDialog : FileDialog

Remarks

This class allows you to check whether a file exists and to open it. The OpenFileDialog.ShowReadOnly property determines whether a read-only check box appears in the dialog box. The OpenFileDialog.ReadOnlyChecked property indicates whether the read-only check box is checked.

Most of the functionality for this class is found in the System.Windows.Forms.FileDialog class.

If you want to give the user the ability to select a folder instead of a file, use System.Windows.Forms.FolderBrowserDialog instead.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0