title: C#: Edit a row of a DataTable that contains an int
body: <p>I'm trying to edit a row in DataTable dt but d[&quot;Count&quot;] and d[&quot;Size&quot;] are objects, so they can't be used with the += operator. I tried casting but that didn't work. Any ideas?</p>
  <pre><code>foreach (DataRow d in dt.Rows)
  {
      if (d[&quot;Type&quot;].Equals(type))
      {
          d[&quot;Count&quot;] += 1;
          d[&quot;Size&quot;] += f.Length;
          found = true;
          break;
      }
  }
  </code></pre>