Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27532

VS 2013 Can I set a string to be multiple values?

$
0
0
Hello, I'm wondering if it's possible to set a string to be multiple different values.

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim str As String
str = TextBox6.Text
Dim vokal As String
vokal = "a"
If str.EndsWith(vokal + vokal) = True Then
MsgBox("The string ends with a vokal!! ")
Else
MsgBox("Failure!")
End If

Can I set 'vokal = ' to be many values (vokal = "a" OR "e") something, like when 'If str.EndsWith(vokal + vokal) = True Then' checks, it can end with aa or ae.

Viewing all articles
Browse latest Browse all 27532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>