DirectoryInfo Constructor
Silverlight
When it is called by trusted applications, initializes a new instance of the DirectoryInfo class. .
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Parameters
- path
- Type: System.String
A string specifying the path on which to create the DirectoryInfo.
| Exception | Condition |
|---|---|
| ArgumentNullException | path is null. |
| SecurityException | The caller does not have the required permission. |
| ArgumentException | path contains invalid characters such as ", <, >, or |. |
| PathTooLongException | The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. The specified path, file name, or both are too long. |
Platform Notes
Silverlight for Windows Phone
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.