一个小程序:窗口显示所需内容

时间:2021-07-14 05:04:47
【文件属性】:
文件名称:一个小程序:窗口显示所需内容
文件大小:765KB
文件格式:ZIP
更新时间:2021-07-14 05:04:47
一个程序 窗口显示 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 list = new List(); list.Add("a"); list.Add("b"); // List list2 = new List { "a", "b" }; List list3 = new List(); 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 list1 = new List { new Student {sno = "0101001", name = "Tom", age = 18 }, new Student { sno = "0101002", name = "Jack", age = 20 } };
【文件预览】:
MyWpfApp20171030
----MyWpfApp20171030.sln(1015B)
----MyWpfApp20171030()
--------Student.cs(314B)
--------Interface1.cs(344B)
--------App.xaml.cs(343B)
--------MyWpfApp20171030.csproj(5KB)
--------MainWindow.xaml.cs(3KB)
--------MyClass.cs(749B)
--------MainWindow.xaml(904B)
--------Properties()
--------App.config(189B)
--------App.xaml(386B)
--------obj()
--------bin()
----.vs()
--------MyWpfApp20171030()

网友评论