Hello Dear,
i have problem to multiple two textboxs ,one is Decimal and second i didnt asign .....
Please check code..

   private void textBox18_Leave(object sender, EventArgs e)
        {

            decimal first;
            decimal second;
            decimal re;
            var b1 = decimal.TryParse(textBox18.Text, out first);
            var b2 = decimal.TryParse(textBox13.Text, out second);
            if (b1 && b2) re = first * second;
            textBox19.Text = re.ToString();

        }

I received error. "use of unassigned local variable 're'.

        I solved 

decimal first;
            decimal second;
            decimal re;
            var b1 = decimal.TryParse(textBox18.Text, out first);
            var b2 = decimal.TryParse(textBox13.Text, out second);
            if (b1 && b2)
            {
                re = first * second;
                textBox19.Text = re.ToString();
            }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.