Initializes a new instance of the DirectoryInfo class on the specified path.
Assembly: mscorlib (in mscorlib.dll)
path is a null reference (Nothing in Visual Basic).
The caller does not have the required permission.
path contains invalid characters such as ", <, >, or |.
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.
This constructor does not check if a directory exists. This constructor is a placeholder for a string that is used to access the disk in subsequent operations.
The path parameter can be a file name, including a file on a Universal Naming Convention (UNC) share.
When you compile a set of characters with a particular cultural setting and retrieve those same characters with a different cultural setting, the characters might not be interpretable, and could cause an exception to be thrown.
For a list of common I/O tasks, see Common I/O Tasks.