c# - Visual Studio 中的 C# 问题,无法单击按钮以正确执行行
问题描述
我的代码有问题
问题是每次我按下完成按钮时都没有计算我正在使用 Visual Studio 在 C# 中编码
private void label1_Click(object sender, EventArgs e)
{
//Variable declaration
int Numtckets;
int NumberofULT = 35;
int NumberofSLT = 55;
int NumberofEZT = 42;
int Total = 0;
//Get input
Numtckets = int.Parse(Numberoftickesearned.Text);
//Processing
if (RADULT.Checked == true)
{
Total = NumberofULT * Numtckets;
TotalLbl.Text = "Your total is..." + Total;
}
else if (RADSLT.Checked == true)
{
Total = NumberofSLT * Numtckets;
TotalLbl.Text = "Your total is..." + Total;
}
else if (RADEZT.Checked == true)
{
Total = NumberofEZT * Numtckets;
TotalLbl.Text = "Your total is..." + Total;
}
else if (RADULT.Checked == false && RADSLT.Checked == false && RADEZT.Checked == false)
{
TotalLbl.Text = "Please enter the number of tickets" + Total;
}
}
}
}
我试过编辑名称属性等,但没有成功。在我这样做之后,我仍然没有得到任何结果,任何帮助都会得到帮助。
解决方案
推荐阅读
- google-drive-api - 从 Python 读取 Google 表格中的评论所需的身份验证范围是什么
- r - 使用 multcomp::glht() 通过交互 Tukey 分析为 2 路方差分析生成 K 矩阵
- java - JavaFX ProgressIndicator 显示一个新的 Stage()
- python - 从数据框格式的文本列中提取单词
- sql-server - SQL查询结果重复
- flutter - 使用 flutter_driver 查找颤振三明治菜单按钮
- vue.js -
组件在使用 vue-server-renderer 的 Vue 服务器端渲染中不起作用 - android - Android活动过渡启动器背景闪烁
- r - 介数()函数igraph社交网络分析R中的错误
- browser - ngbdatepicker 和 ie 11