Gets any query information included in the specified URI, including the leading '?' character if not empty.
public:
property System::String ^ Query { System::String ^ get(); };
public string Query { get; }
member this.Query : string
Public ReadOnly Property Query As String
Property Value
Any query information included in the specified URI.
ExceptionsThis instance represents a relative URI, and this property is valid only for absolute URIs.
ExamplesThe following example writes the query ?date=today
to the console.
Uri baseUri = new Uri ("http://www.contoso.com/");
Uri myUri = new Uri (baseUri, "catalog/shownew.htm?date=today");
Console.WriteLine (myUri.Query);
let baseUri = Uri "http://www.contoso.com/"
let myUri = Uri (baseUri, "catalog/shownew.htm?date=today")
printfn $"{myUri.Query}"
Dim baseUri As New Uri("http://www.contoso.com/")
Dim myUri As New Uri(baseUri, "catalog/shownew.htm?date=today")
Console.WriteLine(myUri.Query)
Remarks
The Query property contains any query information included in the URI. Query information is separated from the path information by a question mark (?) and continues to the end of the URI. The query information returned includes the leading question mark.
The query information is escaped according to RFC 2396 by default. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the query information is escaped according to RFC 3986 and RFC 3987.
For more information on IRI support, see the Remarks section for the Uri class.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4