[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Returns an enumerable collection of directory names in a specified path.
Assembly: System.IO (in System.IO.dll)
- Type: System..::..String
The directory to search.
Return ValueType: System.Collections..::..IEnumerable
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
You can specify relative or absolute path information in the path parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the GetCurrentDirectory method. The returned directory names are prefixed with the value you provided in the path parameter. For example, if you provide a relative path in the path parameter, the returned directory names will contain a relative path.
The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, can be more efficient.
The returned collection is not cached; each call to the on the collection will start a new enumeration.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.