0
I am developing a solution in C# Windows Forms and I’m having doubts about how to take one of my combo box options that is activated when a checked is clicked. This Combo has the option of yes and no, but when I pass it to the parameter the value comes blank.
if (chbSim.Checked)
{
txtValor.Enabled = false;
cmBSimNao.Enabled = true;
param.Valor = cmBSimNao.Text;
param.Nome = this.txtNome.Text;
param.Descricao = this.txtDescricao.Text;
}
I tried to do this, but the Value parameter is string, how can I convert?
– user92218
cmBSimNao.SelectedItem.ToString()
– Bruno H.
That’s what @Brunoh. said. I edited the answer.
– d-aguilar
I did it and it worked. W!
– user92218