Fork me on GitHub

初学C#——选号器

 1      private void Form1_Load(object sender, EventArgs e)
 2         {
 3             Random x = new Random();
 4             int i = x.Next(100); //生成一个大于等于0,小于100之间的随机数
 5             this.label1.Text =
 6             string.Format("{0}", i);
 7         }
 8 
 9         private void button1_Click(object sender, EventArgs e)
10         {
11             Form1_Load(null, null);  //刷新界面
12         }
13 
14         private void label1_Click(object sender, EventArgs e)
15         {
16 
17         }

 下载链接: http://pan.baidu.com/s/1pJNP8Af 密码: 5pwh

posted @ 2014-03-22 00:00  何海洋  阅读(437)  评论(5编辑  收藏  举报