DirectoryInfo.Root Property

 

Gets the root portion of the directory.

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

member Root : DirectoryInfo with 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: