无法将类型 string 隐式转换为"system.windows.forms.textbox"
case2:discount_groupBox.Enabled=true;radioButton1.Checked=true;price_textBox=string.F...
case 2:
discount_groupBox.Enabled = true;
radioButton1.Checked = true;
price_textBox = string.Format("{0:f2}", commonPrice * 90 / 100);
break;
}
}
private void button1_Click(object sender, EventArgs e)
{
double payment, receiving, balance, price;
int tickets;
try
{
tickets = Int32.Parse(total_ticket_textBox.Text);
payment = double.Parse(payment_textbox.Text);
price = double.Parse(price_textBox.Text);
receiving = tickets * price;
receiving_textBox.Text = string.Format("{0:f2}", receiving);
balance = payment - receiving;
balance_textBox = string.Format("{0:f2}", balance);
}
提示这个 无法将类型 string 隐式转换为"system.windows.forms.textbox"。怎么办??错误的是:
price_textBox = string.Format("{0:f2}", commonPrice * 90 / 100);和balance_textBox = string.Format("{0:f2}", balance); 展开
discount_groupBox.Enabled = true;
radioButton1.Checked = true;
price_textBox = string.Format("{0:f2}", commonPrice * 90 / 100);
break;
}
}
private void button1_Click(object sender, EventArgs e)
{
double payment, receiving, balance, price;
int tickets;
try
{
tickets = Int32.Parse(total_ticket_textBox.Text);
payment = double.Parse(payment_textbox.Text);
price = double.Parse(price_textBox.Text);
receiving = tickets * price;
receiving_textBox.Text = string.Format("{0:f2}", receiving);
balance = payment - receiving;
balance_textBox = string.Format("{0:f2}", balance);
}
提示这个 无法将类型 string 隐式转换为"system.windows.forms.textbox"。怎么办??错误的是:
price_textBox = string.Format("{0:f2}", commonPrice * 90 / 100);和balance_textBox = string.Format("{0:f2}", balance); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询