C# Uri UriSchemeMailto
Description
Uri UriSchemeMailto
specifies that the URI is an e-mail
address and is accessed through the Simple Mail Transport Protocol (SMTP).
This field is read-only.
Syntax
Uri.UriSchemeMailto
has the following syntax.
public static readonly string UriSchemeMailto
Example
The following example creates a Uri instance and determines whether the scheme is UriSchemeMailto.
/*from w w w . j a v a 2 s . com*/
using System;
public class MainClass{
public static void Main(String[] argv){
Uri address3 = new Uri("mailto:user@java2s.com?subject=uri");
if (address3.Scheme == Uri.UriSchemeMailto)
Console.WriteLine("Uri is an email address");
}
}
The code above generates the following result.