title: Split and store strings in array
body: <p>I'm retrieving data from Active Directory(name,department,title,company,mail) into a string seperated by commas and I want to split the string and store them to array where i can export it in excel before updating it to my database.</p>
  
  <p>but i how do i store them to an array?</p>
  
  <p>here's the code:</p>
  
  <p>I'm getting data from AD and storing it in list:</p>
  
  <pre><code>Dim formattedName As String = String.Format("{0},{1},{2},{3},{4},{5}", _
                                       resEnt.Properties("name")(0).ToString(), _
                                       resEnt.Properties("company")(0).ToString(), _
                                       resEnt.Properties("department")(0).ToString(), _
                                       resEnt.Properties("title")(0).ToString(), _
                                       resEnt.Properties("sAMAccountName")(0).ToString(), _
                                       resEnt.Properties("Mail")(0).ToString())
  
                  userList.Add(formattedName)
  </code></pre>
  
  <p>after the above loop is done, i'm printing it out. but now i want to split it and store all the data into array</p>
  
  <pre><code>For i = 0 To userList.Count - 1
              Response.Write("&lt;BR&gt;" &amp; userList(i).ToString())
          Next
  </code></pre>
  
  <p>how do i split and store them?</p>