SmtpResponse.TryParse method
The TryParse method gets a value that indicates whether the string specified by the text parameter contains a valid Simple Mail Transfer Protocol (SMTP) response.
Namespace: Microsoft.Exchange.Data.Transport.Smtp
Assembly: Microsoft.Exchange.Data.Transport (in Microsoft.Exchange.Data.Transport.dll)
Syntax
'Declaration
Public Shared Function TryParse ( _
text As String, _
<OutAttribute> ByRef response As SmtpResponse _
) As Boolean
'Usage
Dim text As String
Dim response As SmtpResponse
Dim returnValue As Boolean
returnValue = SmtpResponse.TryParse(text, _
response)
public static bool TryParse(
string text,
out SmtpResponse response
)
Parameters
text
Type: System.StringThe string to validate.
response
Type: Microsoft.Exchange.Data.Transport.Smtp.SmtpResponseAn instance of the SmtpResponse structure that represents the response that is contained in the text parameter. This parameter is passed uninitialized.
Return value
Type: System.Boolean
The TryParse method returns true if the string specified by the text parameter contains a valid Simple Mail Transfer Protocol (SMTP) response; otherwise, the method returns false.