摘要: public string NumToChinese(string x) { //数字转换为中文后的数组 string[] P_array_num = new string[] { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" }; //为数字位数建立一个位数组 string[] P_array_digit = new string[] { &q 阅读全文
posted @ 2012-09-21 09:54 在 水 一 方 阅读(420) 评论(0) 推荐(0) 编辑
摘要: byte by1, by2; if (byte.TryParse(textBox1.Text, out by1) && byte.TryParse(textBox2.Text, out by2))//判断是否是 Byte类型 { try { checked { by1 += by2; textBox3.Text = by1.ToString(); } } catch (OverflowException ex)//溢出异常 { MessageBox.Show(ex.Message); } } else { MessageBox.Show("对不起!您输入的数字有问题! 阅读全文
posted @ 2012-09-21 09:44 在 水 一 方 阅读(215) 评论(0) 推荐(0) 编辑