Uri.UriSchemeMailto 字段

定义

指定 URI 是一个电子邮件地址,需通过简单邮件传输协议 (SMTP) 访问。 此字段为只读。

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

字段值

示例

以下示例创建一个 Uri 实例,并确定方案是否为 UriSchemeMailto

Uri^ address3 = gcnew Uri( "mailto:user@contoso.com?subject=uri" );
if ( address3->Scheme == Uri::UriSchemeMailto )
{
   Console::WriteLine( "Uri is an email address" );
}
Uri address3 = new Uri("mailto:user@contoso.com?subject=uri");
if (address3.Scheme == Uri.UriSchemeMailto)
    Console.WriteLine("Uri is an email address");
let address3 = Uri "mailto:user@contoso.com?subject=uri"
if address3.Scheme = Uri.UriSchemeMailto then
    printfn $"Uri is an email address"
Dim address3 As New Uri("mailto:user@contoso.com?subject=uri")
If address3.Scheme = Uri.UriSchemeMailto Then
    Console.WriteLine("Uri is an email address")
End If

适用于