Show / Hide Table of Contents

Class UriExtensions

Extension methods for System.Uri.
Inheritance
System.Object
UriExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Annex.Uris
Assembly: Annex.dll
Syntax
[PublicAPI]
public static class UriExtensions

Methods

| Improve this Doc View Source

ParseQueryString(Uri)

Parses the query string for the System.Uri.
Declaration
[Pure]
[NotNull]
public static ILookup<string, string> ParseQueryString([NotNull] this Uri this)
Parameters
Type Name Description
System.Uri this The System.Uri for which to parse the query string.
Returns
Type Description
System.Linq.ILookup<System.String, System.String> The parsed query string.
Examples
var uri = new Uri("https://mydomain.com?value=123&value=456");
var queryString = uri.ParseQueryString();
queryString["value"]; // [ "123", "456" ]
queryString["otherValue"]; // []
Exceptions
Type Condition
System.ArgumentNullException this is null.
See Also
Adapted from StackOverflow
  • Improve this Doc
  • View Source
Back to top Copyright © George Taylor Buchanan
Generated by DocFX