title: comparing datarow value with a string in if
body: <p>I have an application which stores a user selected value to the value in my dataset filled datatable. I need to set another column in the table based on this comparison. But the comparison is not working. It always returns false, not entering in the if condition.</p>
  
  <pre><code>foreach (DataRow dr in dsQuestions.Tables[0].Rows)
  {
      if (dr["Data"] == indicater[0])
      {
          dr["IsSelected"] = true;
      }
  }
  </code></pre>
  
  <p><code>indiactor[0]</code> is a string array and <code>dr["data"]</code> is also of type string but it shows a warning that it needs to a string type.</p>