SaveFileDialog::OpenFile Method ()

 

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

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

public:
[SecurityCriticalAttribute]
Stream^ OpenFile()

Return Value

Type: System.IO::Stream^

A new Stream that contains the selected file.

Exception Condition
InvalidOperationException

No files were selected in the dialog.

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

UIPermission

to set this dialog option. Associated enumeration: AllWindows

.NET Framework
Available since 3.0
Return to top
Show: