Uri.UriSchemeHttp 필드


HTTP(Hypertext Transfer Protocol)를 통해 URI에 액세스하도록 지정합니다.Specifies that the URI is accessed through the Hypertext Transfer Protocol (HTTP). 이 필드는 읽기 전용입니다.This field is read-only.

public: static initonly System::String ^ UriSchemeHttp;
public static readonly string UriSchemeHttp;
 staticval mutable UriSchemeHttp : string
Public Shared ReadOnly UriSchemeHttp As String 

필드 값



The following example creates a <xref:System.Uri> instance and determines whether the scheme is <xref:System.Uri.UriSchemeHttp>.

Uri^ address1 = gcnew Uri( "http://www.contoso.com/index.htm#search" );
Console::WriteLine( "address 1 {0} a valid scheme name",
   Uri::CheckSchemeName( address1->Scheme ) ? (String^)" has" : " does not have" );
if ( address1->Scheme == Uri::UriSchemeHttp )
   Console::WriteLine( "Uri is HTTP type" );

Console::WriteLine( address1->HostNameType );
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");

Dim address1 As New Uri("http://www.contoso.com/index.htm#search")
Console.WriteLine("address 1 {0} a valid scheme name", IIf(Uri.CheckSchemeName(address1.Scheme), " has", " does not have")) 'TODO: For performance reasons this should be changed to nested IF statements

If address1.Scheme = Uri.UriSchemeHttp Then
    Console.WriteLine("Uri is HTTP type")
End If 

적용 대상