UriHelper.WithFragment Method
- Namespace
- Kampute.DocToolkit.Support
- Assembly
- Kampute.DocToolkit.dll
Definition
Creates a new Uri with the specified fragment added.
public static Uri WithFragment(this Uri uri, string fragment)Parameters
Returns
Exceptions
- ArgumentNullException
- Thrown when
uriisnull.
Remarks
This method creates a new Uri instance with the specified fragment. If the original URI already has a fragment, the new fragment replaces the existing one. If the new fragment is is an empty string, the fragment part is removed.
