I want to multiply the content of label4 by a number and the result should show in label10 in the same form. how will my code be for example?
if I put in 5000 in label4 I want this 5000 to be multiplied by 0.99
and the result should be shown in label10. my problem is I don’t get any calculated results in Label10
this is what I tried
<code>private void label10_Click(object sender, EventArgs e)
{
decimal a = decimal.Parse(label4.Text);
decimal b = 0.99m;
decimal c = a * b;
label10.Text = c.ToString();
</code>
<code>private void label10_Click(object sender, EventArgs e)
{
decimal a = decimal.Parse(label4.Text);
decimal b = 0.99m;
decimal c = a * b;
label10.Text = c.ToString();
</code>
private void label10_Click(object sender, EventArgs e)
{
decimal a = decimal.Parse(label4.Text);
decimal b = 0.99m;
decimal c = a * b;
label10.Text = c.ToString();
New contributor
My Life is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
9