Forums - C# Corner

Forum guidelines
Shovan Saha

Shovan Saha

  • 1.3k
  • 196
  • 8.2k

string to int problem

Sep 1 2017 2:19 PM
Does not work else statement. Please help me.
int countArmyNC = 0;
foreach (DataGridViewRow row in dataGridView1APen.Rows)
{
if (row.Cells[4].Value.ToString() == "‡mbv evwnbx (bb KwgkÛ)")
{
countArmyNC++;
}
else
{
countArmyNC = "";
}
}
 

Answers (9)