System.Windows.Forms.SaveFileDialog.OpenFile Method

Opens the file with read/write permission selected by the user.

Syntax

public System.IO.Stream OpenFile ()

Returns

The read/write file selected by the user.

Remarks

Note:

For security purposes, this method creates a new file with the selected name and opens it with read/write permissions. This can cause unintentional loss of data if you select an existing file to save to. To save data to an existing file while retaining existing data, use the System.IO.File class to open the file using the file name returned in the FileDialog.FileName property.

Requirements

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