title: How to create a List<T> from a comma separated string?
body: <p>Given the variable</p>
  
  <pre><code>string ids = Request.QueryString["ids"]; // "1,2,3,4,5";
  </code></pre>
  
  <p>Is there any way to convert it into a List without doing something like</p>
  
  <pre><code>List&lt;int&gt; myList = new List&lt;int&gt;();
  
  foreach (string id in ids.Split(','))
  {
      if (int.TryParse(id))
      {
          myList.Add(Convert.ToInt32(id));
      }
  }
  </code></pre>