C#组合框和数值上下计算
Textbox不显示金额以及如何编码,这样当我从组合框中选择某个内容时,我可以为每个内容指定不同的值?在google中搜索如何在C#中调试。这将解决您的问题,并防止您将来遇到类似的问题!C#组合框和数值上下计算,c#,combobox,C#,Combobox,Textbox不显示金额以及如何编码,这样当我从组合框中选择某个内容时,我可以为每个内容指定不同的值?在google中搜索如何在C#中调试。这将解决您的问题,并防止您将来遇到类似的问题! private void submitbutton_Click(object sender, EventArgs e) { if (fishingrodcomboBox.SelectedIndex == 2) { fishingrodcomboBox.SelectedInde
private void submitbutton_Click(object sender, EventArgs e)
{
if (fishingrodcomboBox.SelectedIndex == 2)
{
fishingrodcomboBox.SelectedIndex = 2;
decimal two = 18m;
decimal price = two * fishingrodnumericUpDown.Value;
totalfishingrodtextBox.Text = price.ToString("C");
}
else
{
//Do something
}
}