And the error message is pretty explicit: "Cannot implicitly convert type 'double' to 'string'"
Convert.ToDouble
converts a string to a double, so you line is effectively:
double d1 = Convert.ToDouble(txttot1000.Text);
double d2 = Convert.ToDouble(txtcnbamt1000.Text);
txtowndmgamt1000.Text = Math.Round(d1 - d2);
Math.Round
takes a double, and returns a double. So your code becomes:
double d1 = Convert.ToDouble(txttot1000.Text);
double d2 = Convert.ToDouble(txtcnbamt1000.Text);
double d3 = Math.Round(d1 - d2);
txtowndmgamt1000.Text = d3;
And the Text property is a string. So what you are trying to do is:
string s = 123.4;
Which is not going to work. Convert it to a string:
string s = 123.4.ToString();
And it'll work.
So:
txtowndmgamt1000.Text = Math.Round(Convert.ToDouble(txttot1000.Text) - Convert.ToDouble(txtcnbamt1000.Text)).ToString();
Is what you need.
But I wouldn't do it that way: if the user enters "Hello" instead ot "123.4" in one of your textboxes, your program will crash. Use
Double.TryParse[
^] instead, and report problems to the user.