troubleshooting Question putting string's substring values into an array

Avatar of ouch_mybrain_
ouch_mybrain_ asked on
Visual Basic.NET
7 Comments2 Solutions361 ViewsLast Modified:
Hello Experts,

First of all I am a beginner, I have been actively learning to code for the second day and I like to think im picking it up quickly, if not for the odd stumbling block.

Can someone please help me complete the following code. I am trying to create a small program that accepts a string input and then puts the characters in that string into an array. The code is triggered by the button "Button1" on the form, there is also a text box that allows you to enter the string in the first place.

I know the logic as to how I want it to work (see below), but i'm having trouble putting it into code. Can anyone help or provide advice.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGuess.Click

        Dim array As New ArrayList

        Dim inputword As String
        inputword = txtBoxGuess.Text

        Dim inputwordlength As Integer
        inputwordlength = inputword.Length

        Dim loopcount As Integer

        '[start loop]
        'add next unprocessed character of string "inputword" to first space allocation in array ("inputword.substring(????)")
        'increment integer "loopcount" by 1
        'stop looping when integer "inputword.length" is the same value as integer "loopcount"

    End Sub
End Class

Many Thanks.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros