C# Uri Query
Description
Uri Query
gets any query information included in the specified
URI.
Syntax
Uri.Query
has the following syntax.
public string Query { get; }
Example
The following example writes the query ?date= today to the console.
//from w w w . j av a 2 s. c o m
using System;
public class MainClass{
public static void Main(String[] argv){
Uri baseUri = new Uri ("http://www.java2s.com/");
Uri myUri = new Uri (baseUri, "catalog/shownew.htm?date=today");
Console.WriteLine (myUri.Query);
}
}
The code above generates the following result.