Mono Class Library: System.Uri Overview | Members

System.Uri.PathAndQuery Property

Gets the Uri.AbsolutePath and Uri.Query components of the URI used to construct the current instance. [Edit]

public string PathAndQuery { get; }

Value

A string that contains the values of the Uri.AbsolutePath and Uri.Query properties. [Edit]

Remarks

This property is read-only. [Edit]

Example

The following example uses the Uri.PathAndQuery property to extract the path and query information from a Uri instance.

C# Example
using System;

public class UriTest {
 public static void Main() {

 Uri baseUri = new Uri("http://www.contoso.com/");
 Uri myUri = new Uri(baseUri, "catalog/shownew.htm?date=today");
 
 Console.WriteLine(myUri.PathAndQuery);
 }
}

The output is

/catalog/shownew.htm?date=today

Requirements

Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0