Loop through every letter in string in VB.net

This is a tiny bit of code that will loop and display each letter in a string in VB.net.

Loop through every letter in string in VB.net

Here’s the bit of code you’ll need:

        Dim letters As String = "Hello World"

        For Each singleletter As Char In letters
            MsgBox(singleletter)
        Next

That is a quick and easy solution.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.