int aa;aa = Convert.ToInt32(comboBox1.Text);显示输入的字符串不正确?怎么回事
amespace年月日1{publicpartialclassForm1:Form{publicForm1(){InitializeComponent();}privat...
amespace 年月日1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
int aa;
int bb;
int cc;
aa = Int32.Parse(comboBox1.Text.Trim());
bb = Convert.ToInt32(comboBox2.Text);
cc = Convert.ToInt32(comboBox3.Text);
if (aa % 4 == 0 && aa % 100 != 0 || aa % 400 == 0)
if (bb ==2)
{
cc = 29;
}
else
cc = 28;
}
}
} 展开
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
int aa;
int bb;
int cc;
aa = Int32.Parse(comboBox1.Text.Trim());
bb = Convert.ToInt32(comboBox2.Text);
cc = Convert.ToInt32(comboBox3.Text);
if (aa % 4 == 0 && aa % 100 != 0 || aa % 400 == 0)
if (bb ==2)
{
cc = 29;
}
else
cc = 28;
}
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询