PathSelectionListGetFileEnumerator Method |
Returns an Enumerator to use the PathSelectionList in a foreach statement.
Namespace:
Jam.Shell
Assembly:
ShellBrowser (in ShellBrowser.dll) Version: 7.1
Syntax public IEnumerable<string> GetFileEnumerator()
Public Function GetFileEnumerator As IEnumerable(Of String)
public:
IEnumerable<String^>^ GetFileEnumerator()
member GetFileEnumerator : unit -> IEnumerable<string>
Return Value
Type:
IEnumerableStringReturns all files for the selected paths.
Remarks
The Enumerator will only return files in the list, not directories or drives.
If the
PathSelectionList contains a Drive or a large directory using GetFileEnumerator might be slow, because all Files contained in the Directories are iterated.
As compared to GetFileEnumerator iterating the
PathSelectionList directly will return a unified list consisting of folders and files.
If folder "c:\Windows" is added to a
PathSelectionList GetFileEnumerator will return all files in Windows and its subdirectories.
Iterating it directly will return "c:\Windows\*".
Examples IEnumerator<string> fileEnum =
shellControlConnector1.SelectionList.GetFileEnumerator();
while (fileEnum.MoveNext())
{
}
or
foreach (string file in selectionList.getFileEnumerator() {
}
See Also