I am trying to convert an array of characters into a string array (where each character becomes a string), as I need it to be a string array for some processing on the array later in the program. Here is the code I am using:
Dim inputexpression As String = UCase(txtInput.Text)
Dim arrinputexpressionchar() As Char = inputexpression.ToCharArray()
Dim arrinputexpression() As String
For i = 0 To arrinputexpressionchar.Length
arrinputexpression(i) = Char.ToString(arrinputexpressionchar(i))
Next
However, this throws up a 'NullReferenceException was unhandled' (Object reference was not set to an instance of an object) error. Why does this code not work?
i += 1in aForloop.