title: How to read a text file in C# , separating rows without a delimiter
body: <p>Input text file:</p>
  
  <pre><code>LOCATION_NUMBER|LOCATION_TYPE_CODE|BRANDED_NAME|STORE_TYPE_CODE|STORE_TYPE_DESC|LOCATION_STATUS_CODE|LOCATION_STATUS_DESC|PROPOSED_OPEN_DATE|OPEN_DATE|CLOSE_DATE|PARENT_LOCATION_NUMBER|PARENT_LOCATION_TYPE_CODE**1**|A||||1|Open|07/08/2015 00:00:00|07/08/2015 00:00:00||24|R**1**|D||||2|Closed|05/01/2015 00:00:00|05/01/2015 00:00:00|07/07/2015 00:00:00|199|A
  </code></pre>
  
  <p>The row ends after 12 columns of data. How can I store and separate a row which starts from "1" in a separate record in data table.</p>
  
  <p>Code:</p>
  
  <pre><code>string line;
  while ((line = tr.ReadLine()) != null)
  {
      string[] items = line.Trim().Split('|');
      if (dt.Columns.Count == 0)
      {
          // Create the data columns for the data table based on the number of items
          // on the first line of the file
          //for (int i = 0; i &lt; items.Length; i++)
          dt.Columns.Add(new DataColumn("location_number", typeof(string)));
          dt.Columns.Add(new DataColumn("location_type_code", typeof(string)));
          dt.Columns.Add(new DataColumn("branded_name", typeof(string)));
          dt.Columns.Add(new DataColumn("store_type_code", typeof(string)));
          dt.Columns.Add(new DataColumn("store_type_desc", typeof(string)));
          dt.Columns.Add(new DataColumn("location_status_code", typeof(string)));
          dt.Columns.Add(new DataColumn("location_status_desc", typeof(string)));
          dt.Columns.Add(new DataColumn("proposed_open_date", typeof(DateTime)));
          dt.Columns.Add(new DataColumn("open_date", typeof(DateTime)));
          dt.Columns.Add(new DataColumn("close_date", typeof(DateTime)));
          dt.Columns.Add(new DataColumn("parent_location_number", typeof(string)));
          dt.Columns.Add(new DataColumn("parent_location_type_code", typeof(string)));
      }
  
      dt.Rows.Add(items); 
  }
  </code></pre>