DirectoryInfo.GetDirectories Method (String)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Returns an array of directories in the current DirectoryInfo matching the given search criteria.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- searchPattern
- Type: System.String
The search string, such as "System*", used to search for all directories beginning with the word "System".
| Exception | Condition |
|---|---|
| ArgumentNullException | searchPattern is null. |
| DirectoryNotFoundException | The path encapsulated in the DirectoryInfo object is invalid, such as being on an unmapped drive. |
| SecurityException | The caller does not have the required permission. |
Show: