Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Uri.UriSchemeHttp Field

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Specifies that the URI is accessed through the Hypertext Transfer Protocol (HTTP). This field is read-only.

Namespace:   System
Assembly:  System (in System.dll)

public static readonly string UriSchemeHttp

Field Value

Type: System.String

The following example creates a Uri instance and determines whether the scheme is UriSchemeHttp.

Uri address1 = new Uri("http://www.contoso.com/index.htm#search");
Console.WriteLine("address 1 {0} a valid scheme name",
      Uri.CheckSchemeName(address1.Scheme) ? " has" : " does not have");

if (address1.Scheme == Uri.UriSchemeHttp)
    Console.WriteLine("Uri is HTTP type");

Console.WriteLine(address1.HostNameType);

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2017 Microsoft