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.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version