I want a function to test that a string is formatted like an email address.
What comes built-in with the .NET framework to do this?
This works:
Function IsValidEmailFormat(ByVal s As String) As Boolean
Try
Dim a As New System.Net.Mail.MailAddress(s)
Catch
Return False
End Try
Return True
End Function
But, is there a more elegant way?