title: String Split ASP.NET /C#
body: <p>I am processing CSV File</p>
  
  <p>Say</p>
  
  <pre><code>ABC|06|001
  PPP|06|001
  </code></pre>
  
  <p>I am running LINQ to split the CSV</p>
  
  <pre><code>var path = Server.MapPath("~/App_Data/CSV.txt");
  var _collectCSGData = from line in File.ReadAllLines(path)
                        let parts = line.Split('|')
                         select new { ID = parts[0],Assignment=parts[1]};
  </code></pre>
  
  <p>How to  get the last item of each line ?                </p>
  
  <p>(i.e)</p>
  
  <pre><code>001
  001
  </code></pre>