资源预览内容
第1页 / 共8页
第2页 / 共8页
第3页 / 共8页
第4页 / 共8页
第5页 / 共8页
第6页 / 共8页
第7页 / 共8页
第8页 / 共8页
亲,该文档总共8页全部预览完了,如果喜欢就下载吧!
资源描述
使用C# 开发第一个自己定义的类C03_class新建一个windows 项目 添加类 名称起为Phone.cs 成员为公有: 姓名及电话: public string name; public string phoneNum;Form1 上加入三个控件如下: 双击button1写代码: private void button1_Click(object sender, EventArgs e) Phone obj_tel = new Phone(); obj_tel.name = “赵星“; obj_tel.phoneNum=“13898058858“ ; textBox1.Text= obj_tel.name; textBox2.Text=obj_tel.phoneNum; 单击 button1 的运行效果参考书
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号