C#源代码—在windows窗体中添加一个名为lblShow的Lable控件2

来源:互联网 发布:百度云网络连接失败 编辑:程序博客网 时间:2024/06/10 13:09
在windows窗体中添加一个名为lblShow的Lable控件
然后在源代码视图中编辑如下代码
using System;using System.Windows.Forms;namespace TestVariable{    public partial class TestOperator : Form    {        private void TestVariable_Load(object sender, EventArgs e)        {            int i = 5, j = 5, p, q;            p = (i++) + (i++) + (i++);            q = (++j) + (++j) + (++j);            string t = "    ";            lblShow.Text = i + t + j + t + p + t + q;        }    }}


该程序运行结果为(注意和C语言的不同):
8  8  18  21
0 0
原创粉丝点击