Even finding the desired value in the register vector displays the message "TP não encontrado". I need that when the value is found it does not display the message that was not found.
for (int i = 0; i < cadastro_tp.Length; i++)
{
if (txbTp.Text == cadastro_tp[i].tpv)
{
txbCnpj.Text = cadastro_tp[i].cnpjv;
txbNome.Text = cadastro_tp[i].nomev;
cboCanal.Text = cadastro_tp[i].canalv;
txbPortal.Text = cadastro_tp[i].portalv;
txbEmpresa.Text = cadastro_tp[i].empv;
txbEmail.Text = cadastro_tp[i].emailv;
txbTel.Text = cadastro_tp[i].telv;
break;
}
}
MessageBox.Show("TP não encontrado");