title: Sum numbers on string
body: <p>Am using C#
  I have string of numbers  that are separate with ','like ...</p>
  
  <p>"3,2,2,1,2,1,2"</p>
  
  <p>I want to sum the numbers on the string , how to do that ...in simple way ?
  3+2+2+1+2+1+2=13</p>
  
  <p>any idea ? </p>
  
  <p>here my code ...my string is SupplierAnswer but it dose not work</p>
  
  <p><strong>Grad is Int</strong> 
  <strong>SupplierAnswer is string</strong></p>
  
  <pre><code>      StringBuilder strb = new StringBuilder();
  
          if (_Project.ProjectRequirements != null)
          {
              foreach (Requiernments Req in _Project.ProjectRequirements)
              {
                  strb.Append(Req.SupplierAnswer + ",");
                  this.AddRequirement(Req);
              }
  
              this.SupplierAnswers = strb.ToString();
  
             this.Grad = SupplierAnswers.Split(',').Select(c =&gt; int.Parse(c)).Sum(); 
  
  
  
              this.SupplierAnswers =   this.SupplierAnswers.Remove(this.SupplierAnswers.Length - 1);
          }
  </code></pre>