Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim test as string
- Dim counter as integer
- Dim counter2 as Integer
- test = txtTest.text
- For Each a in test.text
- If a = "a" Then
- counter += 1
- ElseIf a = "A" Then
- counter2 += 1
- End If
- Next
- MsgBox("Amount of a's: " & counter & ", amount of A's: " & counter2)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement