Skip to content

OpenFileDialog.AddExtension

property · OpenFileDialog · cAlgo.API Since 5.1

DesktopCLICloud

Gets or sets a value indicating whether a file dialog automatically adds an extension to a file name if the user omits an extension.

Environment behaviour

CLI — not supported. No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored.

Cloud — not supported. No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored.

Definition

public bool AddExtension {get; set;}
openFileDialog.AddExtension: bool

Returns bool

Examples

var openFileDialog = new OpenFileDialog { AddExtension = true, DefaultExt = "csv" };
openFileDialog.ShowDialog();
openFileDialog = OpenFileDialog()
openFileDialog.AddExtension = True
openFileDialog.DefaultExt = "csv"
openFileDialog.ShowDialog()