title: How to add a string to an array VB.NET?
body: <p>I have an array like so</p>
  
  <pre><code>Dim array() As String = {}
  </code></pre>
  
  <p>and the following code </p>
  
  <pre><code>For i = 0 To membertable.Rows.Count - 1
      If InStr(membertable.Rows(i)("name"), txtSearch.Text, CompareMethod.Text) - 1 _
         &lt;&gt; -1 And txtSearch.Text.Length &gt;= 3 Then
  
          found = True
  
          'add the item that matches the criteria to the array here.
  
      End If
  Next i
  </code></pre>
  
  <p>So the code loops through the rows of an access table and every time it finds a value under the "name" column that matches the criteria I want to add that item to the array. the database item will always be a string. </p>