title: Value of type String cannot be converted into 1 dimensional array of String
body: <p>This is how I have declared my code:</p>
  
  <pre><code>Dim startline As String
  Dim curserline As String
  Dim curserpos As Integer
  Dim x As Integer
  Dim back As Boolean = False
  Dim word() As String
  Dim word1() As String
  
  Dim AutoComplete As New List(Of String)
  
  
  "This is part of my code but am not going to share all of it. I assume your getting."
  
   word1 = sr.ReadLine.Split("|"c)
  
   word = word1
  
   AutoComplete.Add(word(0) &amp; word(1))
  
  
  "For starters, I am getting this error here:"
  
  Value of type String cannot be converted into 1 dimensional array of String
  
  "From here:"
  
  
   word = Mid(RichTextBox1.Text, curserpos + 1, RichTextBox1.SelectionStart - curserpos)
  
  
  "And here:"
  
  
   If auto.StartsWith(word) = True And word &lt;&gt; "" And word &lt;&gt; " " Then
  
  
  "From this code here:"
  
  
  
  Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
  
  
  
      Try
  
          ListView1.Visible = False
          ListView1.Items.Clear()
  
  
  
          startline = RichTextBox1.GetLineFromCharIndex(RichTextBox1.SelectionStart)
          curserline = RichTextBox1.GetLineFromCharIndex(RichTextBox1.SelectionStart)
          curserpos = RichTextBox1.SelectionStart
  
  
  
          While Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; vbTab And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; " " And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; "." And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; "=" And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; "(" And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; ")" And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; "," And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; "&amp;" And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; "{" And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; "}" And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; """" And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; "&lt;" And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; "&gt;" And Mid(RichTextBox1.Text, curserpos, 1) &lt;&gt; "!" And curserline = startline
  
  
  
              curserpos -= 1
              curserline = RichTextBox1.GetLineFromCharIndex(curserpos)
          End While
  
  
          If curserline = startline Then
              word = Mid(RichTextBox1.Text, curserpos + 1, RichTextBox1.SelectionStart - curserpos)
          Else
              word = Mid(RichTextBox1.Text, curserpos + 2, RichTextBox1.SelectionStart - curserpos - 1)
          End If
  </code></pre>
  
  <p>Please help guys! This is a VB.NET question where am trying to build an Autocompletion. But the error displayed in the topic is making my life a living hell. Please help Guys!</p>
  
  <p>The code I have just added:</p>
  
  <pre><code>   For Each auto As String In AutoComplete
  
              If auto.StartsWith(word) = True And word &lt;&gt; "" And word &lt;&gt; " " Then
  </code></pre>
  
  <p>Here is the sr. part please:</p>
  
  <pre><code>    Try
          Dim output As String = "C:\Users\Acer\Documents\Visual Studio 2010\Projects\WindowsApplication3\WindowsApplication3\My Project\Grammarchecker1.txt"
  
  
          If File.Exists(output) Then
              Using sr As New StreamReader(output)
                  While Not sr.EndOfStream
                      word1 = sr.ReadLine.Split("|"c)
  
                      word = word1
  
                      AutoComplete.Add(word(0).ToString &amp; word(1).ToString)
  
  
                  End While
              End Using
          End If
  </code></pre>