C# Uri Scheme
Description
Uri Scheme
gets the scheme name for this URI.
Syntax
Uri.Scheme
has the following syntax.
public string Scheme { get; }
Example
The following example writes the scheme name (http) to the console for the http://www.java2s.com/ URI.
//from w ww . java 2s. 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.Scheme);
}
}
The code above generates the following result.