Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

DirectoryInfo.EnumerateFiles Method

When it is called by trusted applications, returns an enumerable collection of file information in the current directory.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)
public IEnumerable<FileInfo> EnumerateFiles()

Return Value

Type: System.Collections.Generic.IEnumerable<FileInfo>
An enumerable collection of the files in the current directory.
ExceptionCondition
DirectoryNotFoundException

The path encapsulated in the FileInfo object is invalid (for example, it is on an unmapped drive).

SecurityException

The caller does not have the required permission.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.