And I'm having trouble correctly converting this string
to decimal
.
decimal.Parse(txtValor.Text)=meuVen.Valor;
When I place the conversion in front, it shows error after =
. I do not know how to convert the second part, or if I should change the second part instead of the first.
The teacher code is:
private void Leitura2()
{
txtCod2.Text = dgvRegistros2.Rows[dgvRegistros2.CurrentRow.Index].Cells["codigo_servico"].Value.ToString();
Vendas meuVen = new Vendas(int.Parse(txtCod2.Text));
txtNome.Text = meuVen.Nome;
decimal.Parse(txtValor.Text) = meuVen.Valor;
txtEntrega.Text = meuVen.Entrega.ToString("dd/MM/yyyy");
}