OpenFileDialog.FileNames
property · OpenFileDialog · cAlgo.API Since 5.1
DesktopCLICloud
Gets an array that contains one file name for each selected file.
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 string[] FileNames {get;}
openFileDialog.FileNames: list[str]
Returns string[]
Examples
var openFileDialog = new OpenFileDialog { Multiselect = true };
if (openFileDialog.ShowDialog() == FileDialogResult.OK)
{
foreach (var fileName in openFileDialog.FileNames)
Print("Selected: {0}", fileName);
}
openFileDialog = OpenFileDialog()
openFileDialog.Multiselect = True
if openFileDialog.ShowDialog() == FileDialogResult.OK:
for fileName in openFileDialog.FileNames:
api.Print(f"Selected: {fileName}")