Share via


VsShellUtilities.SelectFiles Method

Definition

Gets the selected files from the file dialog.

public static string[] SelectFiles (Microsoft.VisualStudio.Shell.Interop.IVsUIShell2 vsUIShell, IntPtr handle, string title, string initialDirectory, string initialFileName, Microsoft.VisualStudio.Shell.FileDialog.DialogFilters filters);
static member SelectFiles : Microsoft.VisualStudio.Shell.Interop.IVsUIShell2 * nativeint * string * string * string * Microsoft.VisualStudio.Shell.FileDialog.DialogFilters -> string[]
Public Function SelectFiles (vsUIShell As IVsUIShell2, handle As IntPtr, title As String, initialDirectory As String, initialFileName As String, filters As DialogFilters) As String()

Parameters

vsUIShell
IVsUIShell2

The VS UI Shell service.

handle
IntPtr

nativeint

The dialog parent handle.

title
String

The dialog title. Leave this empty to use the default behavior.

initialDirectory
String

The initial directory. Leave this empty to use the default behavior.

initialFileName
String

The initial filename used in the text input box. File paths are not supported. This can be an empty string.

filters
DialogFilters

The dialog filters with a default filter index.

Returns

String[]

An array of selected file paths.

Applies to