共用方式為


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

適用於