Have an email, want to remove the first "@" symbol from it, to then make sure it doesn't have more then one in the second check. Here is currently how I'm doing it.
Dim tempEmail As String = ContactEmail
Dim count As Integer = 0
If tempEmail.IndexOf("@") <> -1 Then 'check for one
count += 1
tempEmail.Remove(tempEmail.IndexOf("@"), 1)
End If
If tempEmail.IndexOf("@") <> -1 Then 'check for two
count += 1
End If
If count = 1 Then
JustifyString(ContactEmail, 66, " ", LEFT_JUSTIFY)
Else
ContactEmail = BLANK_EMAIL
End If
But after debugging, I have found that it never actually removes the "@" symbol from the string from tempEmail. Why?