public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void button_Click(object sender, RoutedEventArgs e) { //类对象的实例化 //MyClass mc = new MyClass(); ////类型转换 //Interface1 i1 = (Interface1)mc; //this.textBlock.Text=i1.Add(3, 5).ToString(); //Interface2 i2 = (Interface2)mc; //this.textBlock.Text += " "+i2.Add(3, 5).ToString(); //Student st = new Student(); //st.sno = "0101001"; //st.name = "Tom"; //st.age = 18; // var st1 = new Student { sno = "0101001", name = "Tom", age = 18 }; //this.textBlock.Text = st.sno + "--" + st.name + "--" + st.age; var p = new { sno = "0101002", name = "Jack", age = 20 }; // this.textBlock.Text +="\n" + p.sno + "--" + p.name + "--" + p.age; List<string> list = new List<string>(); list.Add("a"); list.Add("b"); // List<string> list2 = new List<string> { "a", "b" }; List<Student> list3 = new List<Student>(); Student st = new Student(); st.sno = "0101001"; st.name = "Tom"; st.age = 18; list3.Add(st); Student st2 = new Student(); st2.sno = "0101001"; st2.name = "Tom"; st2.age = 18; list3.Add(st2); // List<Student> list1 = new List<Student> { new Student {sno = "0101001", name = "Tom", age = 18 }, new Student { sno = "0101002", name = "Jack", age = 20 } };
- 1
- 粉丝: 0
- 资源: 1
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- F103-霸道开发板2.8寸电阻触摸屏例程.rar
- Google(高德)地图瓦片python代码下载
- Python实现输出杨辉三角形
- polsarpro官方教程、操作说明 PolSARpro v5.0 Software Training Course
- STM32 TouchGFX的使用二图片显示
- buildx镜像文件,也可以通过网上其他方式获取
- 【中级软件设计师】上午题12-软件工程(2):单元测试、黑盒测试、白盒测试、软件运行与维护
- 免费计算机毕业设计-医院住院管理系统的设计与实现(包含代码+论文)
- tt100k数据转换yolo格式
- 免费计算机毕业设计-学生在线网络考试系统的设计与实现(包含论文+源码)