title: Comma seperated textbox value to list/array of strings - Is there a better way to write this code?
body: <p>I want to create an array/list of strings of the Comma seperated strings (file extensions) that are entered in a Textbox.</p>
  
  <p>For the following block of code:</p>
  
  <pre><code>            Dim csv As String = Textbox1.Text + ","
  
              While csv.IndexOf(".") &lt;&gt; -1
                  lstOfStrings.Add(csv.Substring(0, csv.IndexOf(",")))
                  csv = csv.Remove(0, csv.IndexOf(",") + 1)
              End While
  </code></pre>
  
  <p>The output is:</p>
  
  <p>Textbox1.Text = ".exe,.php"</p>
  
  <p>listOfStrings = { ".exe", ".php" }</p>
  
  <p>Is there a better way to write this code?</p>