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

VS 2010 Removing vowels from string

$
0
0
Sorry guys I guess maybe I did not explain myself very well earlier. I need to copy the user input into the "original" label which I have that working. Then I need to remove the vowels and put the edited string into the "edited" label. I have looked and looked but I am just not seeing it. I have changed what I had but I don't know how to get the results into "edited which is label3". Could someone please please look at this for me? Am I even close to having it right? I keep getting a message that says "varible"vowelcollection" is used before it has been assigned a value".

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim input As String = "billy goats gruff"
Dim strtoremove As String = "aeiouAEIOU"
Dim vowelcollection As String
label2.Text = textbox1.Text
strtoremove.Remove("aeiouAEIOU")


If vowelcollection.contains(strtoremove) Then
vowelcollection.Remove(strtoremove)
label3.Text &= vowelcollection
End If

Viewing all articles
Browse latest Browse all 27365

Trending Articles



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