[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets the names of subdirectories (including their paths) in the specified directory.
Assembly: System.IO (in System.IO.dll)
- Type: System..::..String
The path for which an array of subdirectory names is returned.
Return ValueType: array<System..::..String>()
An array of the full names (including paths) of subdirectories in the specified 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.
If there are no subdirectories, this method returns an empty array.
The path parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see GetCurrentDirectory.
This method is identical to with the asterisk (*) specified as the search pattern, so it returns all subdirectories but searches only the top directory.
The names returned by this method are prefixed with the directory information provided in path.
The path parameter is not case-sensitive.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.