Skip to content

Instantly share code, notes, and snippets.

@facebookegypt
Created January 30, 2014 20:38
Show Gist options
  • Save facebookegypt/8718195 to your computer and use it in GitHub Desktop.
Save facebookegypt/8718195 to your computer and use it in GitHub Desktop.
VB 2010 OOP Lesson - Classes Intro [Email Validation]
'Visual Basic Online Course - OOP
'OOP Lesson - Classes Intro
'Project : Email Validation
'Source : evry1.net/VBNet
Public Class Form1
Private Sub BtnValid_Click(sender As System.Object, _
e As System.EventArgs) Handles BtnValid.Click
Dim X, Y As Integer
X = TxtEmail.Text.IndexOf("@")
If X >= 1 Then
Y = TxtEmail.Text.IndexOf(".", X)
If Y < 1 Then
MsgBox("Invalid E-mail Address")
End If
Else
MsgBox("Invalid E-mail Address")
End If
End Sub
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment