WebDavExtensions GetParentUri Method WebDAV#
Gets the Uri to the parent object.

Namespace: WebDAVSharp.Server
Assembly: WebDAVSharp.Server (in WebDAVSharp.Server.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static Uri GetParentUri(
	this Uri uri
)

Parameters

uri
Type: System Uri
The Uri of a resource, for which the parent Uri should be retrieved.

Return Value

Type: Uri
The parent Uri.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Uri. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionuri
InvalidOperationExceptionCannot get parent of root
ArgumentNullExceptionuri is null.
InvalidOperationExceptionuri has no parent, it refers to a root resource.
See Also