[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Returns a file list from the current directory.
Assembly: System.IO (in System.IO.dll)
The and methods differ as follows:
When you use , you can start enumerating the collection of FileInfo objects before the whole collection is returned.
When you use , you must wait for the whole array of FileInfo objects to be returned before you can access the array.
Therefore, when you are working with many files and directories, can be more efficient.
If there are no files in the DirectoryInfo, this method returns an empty array.
The order of the returned file names is not guaranteed; use the method if a specific sort order is required.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.