title: DataTable last row as the first?
body: <p>So I have a snippet of the code here that works except for one line which is the InsertAt() part. I would like to know if it is possible to copy the last row and insert it as the first. Think of the idea as this. It probably can be done in the SQL alone behind it but this application is designed to work for both a very old database and oracle so until the system migrates entirely it has to be done like this, unfortunately. </p>
  
  <p>Prior </p>
  
  <ul>
  <li>Shipment Location 1</li>
  <li>Shipment Location 2</li>
  <li>Shipment Location 2</li>
  </ul>
  
  <p>After</p>
  
  <ul>
  <li>Start Location </li>
  <li>Shipment Location 1</li>
  <li>Shipment Location 2</li>
  <li>Shipment Location 3</li>
  <li>Destination Location</li>
  </ul>
  
  <p>The code snippet: </p>
  
  <pre><code>// Create a DataTable with a list of shipments.    
  DataTable dt = c.Query(c.qShipments(Row.Cells[0].Value.ToString()));
  // Check if there is at least one shipment
  if (dt.Rows.Count &gt;= 1)
  {
      // Add the destination of the shipments
      dt.Rows.Add(0, 0, 9999, textBox_CC.Text, textBox_PC.Text, textBox_SL.Text);
      // Add the starting location (which is the same as the destination. It has to be at the top of the DataTable
      dt.Rows.InsertAt(dt.Rows[dt.Rows.Count - 1], 0); // The code
  
      // Finally calculate and return the object to populate the datagridview with.
      dataGridView_CalculatedRoutes.Rows.Add(x.getRoute(dt));
  }
  </code></pre>
  
  <p>tldr; </p>
  
  <p>Issue: Code returns Row belongs to another table. </p>
  
  <p>Question: How to get the last row to be the first aswell?</p>
  
  <p>Edit question: How to get the last row to be both the first and the last row. (Identical rows)</p>