Look at this:
foreach(Object Item in comboBox1.Items)
{
if (Convert.ToString(Item) == Convert.ToString(dsGirasol.Tables["DatosGirasol"].Rows[contador][0]))
{
repetido = true;
break;
}
else
{
repetido = false;
}
}
Note that both of the possible outputs have a messagebox. However when I run this, nothing appears at all, and the rest of the code continues to run...
EDIT: Added the surrounding loop!