求大神解答
net吧
全部回复
仅看楼主
level 2
int day = 0;
//获得月份
String strMonth = comboBox2.SelectedItem.ToString().Split(new char[]{'月'},StringSplitOptions.RemoveEmptyEntries)[0];
String strYear = comboBox2.SelectedItem.ToString().Split(new char[]{'年'}, StringSplitOptions.RemoveEmptyEntries)[0];
//将月份转成整型,这里却报错,显示我上面那个月和年还没有分割出去,这怎么解决
int year = Convert.ToInt32(strYear);
int month = Convert.ToInt32(strMonth);
2016年07月12日 02点07分 1
1