Skip to content

SaveFileDialog.DefaultExt

property · SaveFileDialog · cAlgo.API Since 5.1

DesktopCLICloud

Gets or sets a value that specifies the default extension string to use to filter the list of files that are displayed.

Environment behaviour

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

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

Definition

public string DefaultExt {get; set;}
saveFileDialog.DefaultExt: str

Returns string

Examples

var saveFileDialog = new SaveFileDialog { DefaultExt = "csv", Filter = "CSV files (*.csv)|*.csv" };
saveFileDialog.ShowDialog();
Print("Default extension: {0}", saveFileDialog.DefaultExt);
saveFileDialog = SaveFileDialog()
saveFileDialog.DefaultExt = "csv"
saveFileDialog.Filter = "CSV files (*.csv)|*.csv"
saveFileDialog.ShowDialog()
api.Print(f"Default extension: {saveFileDialog.DefaultExt}")