DirectoryInfo::Root Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the root portion of the directory.

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

property DirectoryInfo^ Root {
	DirectoryInfo^ get();

Property Value

Type: System.IO::DirectoryInfo^

An object that represents the root of the directory.

Exception Condition

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.


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
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top