title: Calculating sum of a column from web service
body: <p>Let me start out by saying I know nothing of C#. I do web design, and am pretty much limited to that with a limited amount of javascript.</p>
  
  <p>I was given a web service, and the goal is to pull the data with that, which I was able to do. Now I'm trying to figure out a way to calculate the total of one of the columns. Everything I've seen has talked about DataTables, which I know nothing of. I'm not sure if DataTables are a required thing, or anything really. </p>
  
  <p>The question is - is there a way to calculate the total of one of the columns? The column is called "total" and I'd like to get the total into a string called "points".</p>
  
  <p>edit - 
  I'm not the one who made the web service, nor do I have access to editing it. I emailed the guy who made it a few hours ago telling him exactly what was going on, no response. Unfortunately, there's not a whole lot more information I can add. </p>
  
  <pre><code>decimal total = Convert.ToDecimal(t11) + Convert.ToDecimal(t12);
  </code></pre>
  
  <p>That's the code to add t11 and t12 together, which gets the total, but I need to figure out a way to add up the total for each row.</p>
  
  <p>edit2 - </p>
  
  <pre><code> decimal GetTotal()
  {
      decimal total = 0;
      foreach (XmlNode rec in records)
      {
          total += Convert.ToDecimal(rec.SelectSingleNode("sub_total").innerText);
      }
      return total;
  } 
  </code></pre>