Share via


Parent Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the parent directory of a specified subdirectory.

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

Syntax

'Declaration
Public ReadOnly Property Parent As DirectoryInfo
public DirectoryInfo Parent { get; }
public:
property DirectoryInfo^ Parent {
    DirectoryInfo^ get ();
}
member Parent : DirectoryInfo with get
function get Parent () : DirectoryInfo

Property Value

Type: System.IO. . :: . .DirectoryInfo
The parent directory, or nullNothingnullptrunita null reference (Nothing in Visual Basic) if the path is null or if the file path denotes a root (such as "\", "C:", or * "\\server\share").

.NET Framework Security

See Also

Reference

DirectoryInfo Class

System.IO Namespace