UriHelper.WithoutFragment Method

Namespace
Kampute.DocToolkit.Support
Assembly
  • Kampute.DocToolkit.dll

Definition

Creates a new Uri with the fragment removed.
public static Uri WithoutFragment(this Uri uri)

Parameters

uri Uri
The Uri instance to remove the fragment from.

Returns

Uri
A new Uri with the fragment removed.

Exceptions

ArgumentNullException
Thrown when uri is null.

Remarks

This method removes any fragment identifier from the URI. If the URI does not have a fragment, the original URI is returned unchanged.