SaveFileDialog.OpenFile Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Creates a read-write file stream for the filename selected by the user using SaveFileDialog.

Namespace:   Microsoft.Win32
Assembly:  PresentationFramework (in PresentationFramework.dll)

public Stream OpenFile()

Return Value

Type: System.IO.Stream

A new Stream that contains the selected file.

Exception Condition

No files were selected in the dialog.

The file stream that is returned is opened with read-write access (Create and ReadWrite).


to set this dialog option. Associated enumeration: AllWindows

.NET Framework
Available since 3.0
Return to top