RoutingDomain.TryParse Method
The TryParse 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 TryParse ( _
domain As String, _
<OutAttribute> ByRef routingDomain As RoutingDomain _
) As Boolean
'Usage
Dim domain As String
Dim routingDomain As RoutingDomain
Dim returnValue As Boolean
returnValue = RoutingDomain.TryParse(domain, _
routingDomain)
public static bool TryParse(
string domain,
out RoutingDomain routingDomain
)
Parameters
- domain
Type: System.String
The SMTP domain to convert.
- routingDomain
Type: Microsoft.Exchange.Data.Transport.RoutingDomain
When this method returns, the parameter routingDomain contains an instance of the RoutingDomain structure that represents the domain that is specified by the domain parameter. This parameter is passed uninitialized.
Return Value
Type: System.Boolean
The TryParse method returns a value of true if the specified domain is valid; otherwise, the method returns a value of false.