Performs a selection of a file for loading or saving with the specified filter.

Namespace:  SGP.XUtility
Assembly:  SGP.XUtility (in SGP.XUtility.dll)
Version: 1.2.3019.18718

Syntax

C#
public static string ChooseFile(
	string filter,
	string fileName,
	bool saving
)

Parameters

filter
Type: System..::.String
A filter string for files defines file extensions which will be shown in the selection. The filter must have a format "[shown name]|*.type1;*.type2". For example : "Images(*.BMP,*JPG,*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*".
fileName
Type: System..::.String
The name of the implicit selected file.
saving
Type: System..::.Boolean
Defines whether the dialog will be used for saving or loading files.

Return Value

Gets the full path of the selected file, otherwise returns nullNothingnullptra null reference (Nothing in Visual Basic).

See Also