RoutingDomain.Parse Method

The Parse method converts the string representation of a Simple Mail Transfer Protocol (SMTP) domain to an equivalent instance of the RoutingDomain structure. This member was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

Namespace:  Microsoft.Exchange.Data.Transport
Assembly:  Microsoft.Exchange.Data.Transport (in Microsoft.Exchange.Data.Transport.dll)

Syntax

'Declaration
Public Shared Function Parse ( _
    domain As String _
) As RoutingDomain
'Usage
Dim domain As String
Dim returnValue As RoutingDomain

returnValue = RoutingDomain.Parse(domain)
public static RoutingDomain Parse(
    string domain
)

Parameters

Return Value

Type: Microsoft.Exchange.Data.Transport.RoutingDomain
The Parse method returns an instance of the RoutingDomain structure that represents the specified SMTP domain if the specified domain is valid; otherwise, the method throws a System.FormatException exception.

Remarks

The TryParse method performs the same function as the Parse method, but does not throw an exception.