UriBuilder.Scheme Property

Definition

获取或设置 URI 的方案名称。Gets or sets the scheme name of the URI.

public:
 property System::String ^ Scheme { System::String ^ get(); void set(System::String ^ value); };
public string Scheme { get; set; }
member this.Scheme : string with get, set
Public Property Scheme As String

Property Value

String

URI 的方案。The scheme of the URI.

Exceptions

不能将该方案设为无效的方案名称。The scheme cannot be set to an invalid scheme name.

Remarks

下表列出了 Scheme 属性的有效方案名称。The following table lists the valid scheme names for the Scheme property.

SchemeScheme 说明Description
文件file 资源是本地计算机上的文件。The resource is a file on the local computer.
ftpftp 资源通过 FTP 访问。The resource is accessed through FTP.
gophergopher 资源可通过 Gopher 协议进行访问。The resource is accessed through the Gopher protocol.
httphttp 资源可通过 HTTP 访问。The resource is accessed through HTTP.
httpshttps 资源通过 SSL 加密的 HTTP 访问。The resource is accessed through SSL-encrypted HTTP.
mailtomailto 该资源是一个电子邮件地址,可通过 SMTP 访问。The resource is an email address and is accessed through SMTP.
newsnews 资源通过 NNTP 访问。The resource is accessed through NNTP.

Applies to

See also