Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DirectoryInfo::Root Property

 

Gets the root portion of the directory.

Namespace:   System.IO
Assembly:  mscorlib (in mscorlib.dll)

public:
property DirectoryInfo^ Root {
	DirectoryInfo^ get();
}

Property Value

Type: System.IO::DirectoryInfo^

An object that represents the root of the directory.

Exception Condition
SecurityException

The caller does not have the required permission.

The following example displays root locations for specified directories.

No code example is currently available or this language may not be supported.

FileIOPermission

for reading from files and directories and for access to the path. Associated enumerations: System.Security.Permissions::FileIOPermissionAccess, System.Security.Permissions::FileIOPermissionAccess

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2017 Microsoft